User forums > Using Code::Blocks

Can't link wx xml module

(1/1)

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

DanRR:

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

-John E. / TDM

--- End quote ---

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.

Navigation

[0] Message Index

Go to full version