Jump to content
  • Advertisement
Sign in to follow this  
c-gibson-s

Jeez.

This topic is 4900 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I really hate linker problems. It's like debugging but the debugger telling you nothing. Anyway, i am getting a LNK2019 and an LNK 2001 with my TinyXML libraries. Here is the error(s) -
gEnemy.obj : error LNK2019: unresolved external symbol "public: class TiXmlElement * __thiscall TiXmlNode::NextSiblingElement(char const *)const " (?NextSiblingElement@TiXmlNode@@QBEPAVTiXmlElement@@PBD@Z) referenced in function "public: void __thiscall gEnemy::load(char const *)" (?load@gEnemy@@QAEXPBD@Z)
gLevel.obj : error LNK2001: unresolved external symbol "public: class TiXmlElement * __thiscall TiXmlNode::NextSiblingElement(char const *)const " (?NextSiblingElement@TiXmlNode@@QBEPAVTiXmlElement@@PBD@Z)
gPlayer.obj : error LNK2001: unresolved external symbol "public: class TiXmlElement * __thiscall TiXmlNode::NextSiblingElement(char const *)const " (?NextSiblingElement@TiXmlNode@@QBEPAVTiXmlElement@@PBD@Z)
gEnemy.obj : error LNK2019: unresolved external symbol "public: class TiXmlElement * __thiscall TiXmlNode::FirstChildElement(char const *)const " (?FirstChildElement@TiXmlNode@@QBEPAVTiXmlElement@@PBD@Z) referenced in function "public: void __thiscall gEnemy::load(char const *)" (?load@gEnemy@@QAEXPBD@Z)
gLevel.obj : error LNK2001: unresolved external symbol "public: class TiXmlElement * __thiscall TiXmlNode::FirstChildElement(char const *)const " (?FirstChildElement@TiXmlNode@@QBEPAVTiXmlElement@@PBD@Z)
gPlayer.obj : error LNK2019: unresolved external symbol "public: class TiXmlElement * __thiscall TiXmlNode::FirstChildElement(char const *)const " (?FirstChildElement@TiXmlNode@@QBEPAVTiXmlElement@@PBD@Z) referenced in function "public: int __thiscall gPlayer::playerInit(struct SDL_Surface *)" (?playerInit@gPlayer@@QAEHPAUSDL_Surface@@@Z)
Debug/15.exe : fatal error LNK1120: 2 unresolved externals


I have included the .lib file (built off of the TinyXML .dsw that is included off of it's developer pack. I got the headers where they are supposed to be. This actually was working for a while, then i had to reinstall windows, and dont know why the coding gods must hate me so. Any ideas? As far as i can see, this should work.. Thanks.

Share this post


Link to post
Share on other sites
Advertisement
I'm not entirely sure, but I recently used TinyXML as well and this part from the site is what I did:

Quote:

To Use in an Application:

Add tinyxml.cpp, tinyxml.h, tinyxmlerror.cpp, tinyxmlparser.cpp, and tinystr.cpp to your project or make file. That's it! It should compile on any reasonably compliant C++ system. You do not need to enable exceptions or RTTI for TinyXml.


I just downlaoded it off of SourceForge and in the readme it also has:
Quote:
TinyXml is designed to be easy and fast to learn. It is two headers
and four cpp files. Simply add these to your project and off you go.


However, there was a project for the library as well that was compiled as a lib, so you may want to double check that you have built both versions, debug and release versions of the library and have linked both in for each configuration of your project. The file is "tinyxmld.lib" for debug and "tinyxml.lib" for release. Good luck!

Share this post


Link to post
Share on other sites
I'm using tiny XML for my config files...it's pretty good except there's not much docmentation for it.

I added the .h(s) and the source files to my project as described and it worked okay under DEV-C++. Didn't use the dll though.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!