Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: DanRR on October 01, 2008, 04:47:39 pm

Title: Can't link wx xml module
Post by: DanRR on October 01, 2008, 04:47:39 pm
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
Title: Re: Can't link wx xml module
Post by: TDragon on October 01, 2008, 05:48:41 pm
Also add libwxexpat.a.

-John E. / TDM
Title: Re: Can't link wx xml module
Post by: DanRR on October 01, 2008, 10:05:29 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?
Title: Re: Can't link wx xml module
Post by: TDragon on October 02, 2008, 05:10:02 am
Documentation, a knowledge of the library's internals, and/or trial and error.