News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

Can't link wx xml module

Started by DanRR, October 01, 2008, 04:47:39 PM

Previous topic - Next topic

DanRR

I've created wx project with Unicode monolithic build. The compiler is MinGW (on Windows).
wxWidgets version is 2.8.7 (I'm using the prebuild wxPack) .
My project uses wx xml module (wx/xml/xml.h header).
The project won't link, issuing the following errors:

C:\wxWidgets2.8.7\lib\gcc_lib\libwxmsw28u.a(monolib_xml.o):xml.cpp:(.text+0x3510)||undefined reference to `_XML_ParserCreate'|
C:\wxWidgets2.8.7\lib\gcc_lib\libwxmsw28u.a(monolib_xml.o):xml.cpp:(.text+0x356f)||undefined reference to `_XML_SetUserData'|
C:\wxWidgets2.8.7\lib\gcc_lib\libwxmsw28u.a(monolib_xml.o):xml.cpp:(.text+0x358f)||undefined reference to `_XML_SetElementHandler'|
C:\wxWidgets2.8.7\lib\gcc_lib\libwxmsw28u.a(monolib_xml.o):xml.cpp:(.text+0x35a6)||undefined reference to `_XML_SetCharacterDataHandler'|
C:\wxWidgets2.8.7\lib\gcc_lib\libwxmsw28u.a(monolib_xml.o):xml.cpp:(.text+0x35bd)||undefined reference to `_XML_SetStartCdataSectionHandler'|
C:\wxWidgets2.8.7\lib\gcc_lib\libwxmsw28u.a(monolib_xml.o):xml.cpp:(.text+0x35d4)||undefined reference to `_XML_SetCommentHandler'|
C:\wxWidgets2.8.7\lib\gcc_lib\libwxmsw28u.a(monolib_xml.o):xml.cpp:(.text+0x35eb)||undefined reference to `_XML_SetDefaultHandler'|
C:\wxWidgets2.8.7\lib\gcc_lib\libwxmsw28u.a(monolib_xml.o):xml.cpp:(.text+0x3608)||undefined reference to `_XML_SetUnknownEncodingHandler'|
C:\wxWidgets2.8.7\lib\gcc_lib\libwxmsw28u.a(monolib_xml.o):xml.cpp:(.text+0x367e)||undefined reference to `_XML_Parse'|
C:\wxWidgets2.8.7\lib\gcc_lib\libwxmsw28u.a(monolib_xml.o):xml.cpp:(.text+0x3757)||undefined reference to `_XML_GetErrorCode'|
C:\wxWidgets2.8.7\lib\gcc_lib\libwxmsw28u.a(monolib_xml.o):xml.cpp:(.text+0x375f)||undefined reference to `_XML_ErrorString'|
C:\wxWidgets2.8.7\lib\gcc_lib\libwxmsw28u.a(monolib_xml.o):xml.cpp:(.text+0x379e)||undefined reference to `_XML_GetCurrentLineNumber'|
C:\wxWidgets2.8.7\lib\gcc_lib\libwxmsw28u.a(monolib_xml.o):xml.cpp:(.text+0x38b2)||undefined reference to `_XML_ParserFree'|

I added libwxbase28u_xml.a to the Release build, but got the same errors.

What should I do to link it?
Thanks

TDragon

Also add libwxexpat.a.

-John E. / TDM
[url="https://jmeubank.github.io/tdm-gcc/"]https://jmeubank.github.io/tdm-gcc/[/url] - TDM-GCC compiler suite for Windows (GCC 9.2.0 2020-03-08, 32/64-bit, no extra DLLs)

DanRR

Quote from: TDragon on October 01, 2008, 05:48:41 PM
Also add libwxexpat.a.

-John E. / TDM

Thanks! it worked.
BTW, how can you determine which library files do you need in a wx project?

TDragon

Documentation, a knowledge of the library's internals, and/or trial and error.
[url="https://jmeubank.github.io/tdm-gcc/"]https://jmeubank.github.io/tdm-gcc/[/url] - TDM-GCC compiler suite for Windows (GCC 9.2.0 2020-03-08, 32/64-bit, no extra DLLs)