error linking wxXmlDocument and wxXmlNode 2.8.0 / VC++2.5 Topic is solved

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.
Franck REVOLLE
In need of some credit
In need of some credit
Posts: 2
Joined: Sun Feb 11, 2007 8:59 pm

error linking wxXmlDocument and wxXmlNode 2.8.0 / VC++2.5

Post by Franck REVOLLE »

I start from an existing simple samle available in 2.8.0 : minimal project.
No problem up to here ! It runs without problem :-)
After all the includes, I add #include <wx/xml/xml.h>
In the OnAbout method, I add : wxXmlDocument doc; (like suggested in the documentation of wxXmlDocument delivered in 2.8.0 )
cf. atached file testxml.cpp
Compilation : OK

Link : error LNK2019 : unsolved external symbol "public: __thiscall wxXmlDocument::wxXmlDocument(void)" etc...
plus 5 additional unsolved links related to this one.

I have the same error, trying all solution fot the constructor (like wxXmlDocument *doc = new wxXmlDocument(); etc...)

In another more complex source code, I have no issue with wxXmlNode::GetProperties, wxXmlProperty::GetName etc..., but the same link error with wxXmlNode::HasProp or wxXmlNode::GetPropVal. And of course the same link error with wxXmlDocument::wxXmlDocument.

I have the last wxWidgets 2.8.0, and Microsoft Visual Studio C++ Express 2005 8.0, and no problem with other wxWidgets objetcs (frames, splitter, treectrl, ...)[/img]

thank you for your help !
You do not have the required permissions to view the files attached to this post.
biplab
I live to help wx-kind
I live to help wx-kind
Posts: 194
Joined: Fri Feb 17, 2006 4:16 am
Location: Singapore

Post by biplab »

Did you add XML lib? Add wxbase28_xml.lib to the project and that should solve your problem.

Regards,

Biplab
Blog: http://biplab.in

IDE: Code::Blocks
Compilers: GCC, MSVC, etc. ;)
OS: WinXP-SP2 & Linux.
Franck REVOLLE
In need of some credit
In need of some credit
Posts: 2
Joined: Sun Feb 11, 2007 8:59 pm

Solved , thanks

Post by Franck REVOLLE »

Thank you for your answer. It works.
To be clean, I've added the project C:\wxWidgets-2.8.0\build\msw\wx_xml.vcproj in my solution (like I have the two other projects C:\wxWidgets-2.8.0\build\msw\wx_core.vcproj, and C:\wxWidgets-2.8.0\build\msw\wx_base.vcproj)

Thank you very much
biplab
I live to help wx-kind
I live to help wx-kind
Posts: 194
Joined: Fri Feb 17, 2006 4:16 am
Location: Singapore

Post by biplab »

That's great. :)

Now accept the answer to close the thread so that others can get benefit and also i get some points. ;)
Blog: http://biplab.in

IDE: Code::Blocks
Compilers: GCC, MSVC, etc. ;)
OS: WinXP-SP2 & Linux.