Author Topic: Can't link wx xml module  (Read 4927 times)

Offline DanRR

  • Multiple posting newcomer
  • *
  • Posts: 18
Can't link wx xml module
« 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

Offline TDragon

  • Lives here!
  • ****
  • Posts: 943
    • TDM-GCC
Re: Can't link wx xml module
« Reply #1 on: October 01, 2008, 05:48:41 pm »
Also add libwxexpat.a.

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

Offline DanRR

  • Multiple posting newcomer
  • *
  • Posts: 18
Re: Can't link wx xml module
« Reply #2 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?

Offline TDragon

  • Lives here!
  • ****
  • Posts: 943
    • TDM-GCC
Re: Can't link wx xml module
« Reply #3 on: October 02, 2008, 05:10:02 am »
Documentation, a knowledge of the library's internals, and/or trial and error.
https://jmeubank.github.io/tdm-gcc/ - TDM-GCC compiler suite for Windows (GCC 9.2.0 2020-03-08, 32/64-bit, no extra DLLs)