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

## Recommended Posts

My project requires the use of TinyXML and we would prefer to link statically against it than include the source and header files within our project. I've downloaded the 2.5.3 build from the TinyXML SourceForge page, and built the projects just fine. The two sample applications also run fine. The problem is that when linking against them in my project, I get 100 or so link errors. I've compared the project files for TinyXMLSTLTest and my project using WinMerge and couldn't spot any settings that may have been conflicting between the libraries and my project. I've actually always had trouble getting TinyXML to link statically and in the end I always end up having to include the headers and source directly into my project in order to get it to successfully link. Unfortunately the project files are on my laptop and it's currently unable to connect to the internet, so apologies but I can't give all of the errors (the first 50 of which are pretty much identical to this) Note this isn't a copy paste so it may contain slight typos (it's really hard to type these out by hand!) "LNK2005: "public: __thiscall std::basic_string<char, struct std::char_traits<char>, class std::allocator<char> >::basic_string<char, struct std::char_traits<char>, std::allocator<char> >(char const*) (??0?$basic_string@DU?$char_traits@D@std@@V?\$allocator@D@2@std@@QAE@PBD@Z) already defined in msvcprtd.lib(MSVCP90D.dll) in file tinyxml_STL.lib" Any suggestions? Has anyone managed to statically link with TinyXML before? Does anyone have a working build of version 2.5.3 that they could share? edit: sorry about the page stretch, I think i broke something :S

##### Share on other sites
Nevermind, I figured it out.

The TinyXML project needed to be set to "multithreaded DLL" under c++->code generation

No idea why, seeings as it's a .lib but whatever >_>

1. 1
Rutin
23
2. 2
3. 3
JoeJ
20
4. 4
5. 5

• 9
• 33
• 41
• 23
• 13
• ### Forum Statistics

• Total Topics
631745
• Total Posts
3002003
×