Problem reference wxXmlNode

Do you have a question about makefiles, a compiler or IDE you are using and need to know how to set it up for wxWidgets or why it doesn't compile but other IDE's do ? Post your questions here.
Post Reply
dkaip
Super wx Problem Solver
Super wx Problem Solver
Posts: 251
Joined: Wed Jan 20, 2010 1:15 pm

Problem reference wxXmlNode

Post by dkaip » Fri May 29, 2020 11:20 am

Hello.
Downloading wxWidgets3.1.3, minGW-w64 and build with mingw32-make SHELL=CMD.exe -f makefile.gcc BUILD=release UNICODE=1 SHARED=0 libs
i have the libs
libwxbase31u.a , libwxbase31u_net.a , libwxbase31u_xml.a , libwxexpat.a , libwxjpeg.a, libwxmsw31u_adv.a, libwxmsw31u_aui.a, libwxmsw31u_core.a, libwxmsw31u_gl.a, libwxmsw31u_html.a, libwxmsw31u_media.a, libwxmsw31u_propgrid.a
libwxmsw31u_ribbon.a, libwxmsw31u_richtext.a, libwxmsw31u_stc.a, libwxmsw31u_webview.a, libwxmsw31u_xrc.a, libwxpng.a, libwxregexu.a, libwxscintilla.a, libwxtiff.a, libwxzlib.a
Linker says.

Code: Select all

undefined reference to `wxXmlNode::GetAttribute(wxString const&, wxString const&) const'|
Any idea how to solve this?
Thank you
Jim

PB
Part Of The Furniture
Part Of The Furniture
Posts: 2469
Joined: Sun Jan 03, 2010 5:45 pm

Re: Problem reference wxXmlNode

Post by PB » Fri May 29, 2020 12:03 pm

Is this the only error you got?

If you get many similar errors for wxXML, I would check if your library order is correct. FWIW, the output of build of project created with Code::Blocks wizard has it
-lwxmsw31u_richtext -lwxmsw31u_xrc -lwxmsw31u_aui -lwxmsw31u_media -lwxbase31u_net -lwxmsw31u_gl -lwxbase31u_xml -lwxmsw31u_adv -lwxmsw31u_html -lwxmsw31u_core -lwxbase31u -lwxpng -lwxjpeg -lwxtiff -lwxzlib -lwxregexu -lwxexpat
Where the xml library precedes both core and base library.

dkaip
Super wx Problem Solver
Super wx Problem Solver
Posts: 251
Joined: Wed Jan 20, 2010 1:15 pm

Re: Problem reference wxXmlNode

Post by dkaip » Fri May 29, 2020 3:24 pm

Thank you very mutch.
It works. Ok.
I want to know the way to reproduce in future the order of libs. There is a way?
Thanks.
Jim

PB
Part Of The Furniture
Part Of The Furniture
Posts: 2469
Joined: Sun Jan 03, 2010 5:45 pm

Re: Problem reference wxXmlNode

Post by PB » Fri May 29, 2020 3:29 pm

I think that if libraryA requires libraryB, libraryA must be listed before libraryB, otherwise the linker will complain about missing symbols (which are in libraryB).

You can see which wxWidgets library requires which here
https://docs.wxwidgets.org/trunk/page_libs.html

EDIT: Fxed the order.

Post Reply