It depends on a lot of things (platform, compiler, what have you added already), but assuming you're using msvc 6 on Windows you need to add one of these to the link list:
tinyxmld.lib (debug)
or
tinyxml.lib (release)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Choices:
- did you build debug and with no STL: use tinyxmld.lib (there is a "t" on the front; it is not "inyxml.lib")
- did you build debug and WITH STL?: use tinyxmld_STL.lib
- did you build release WITH STL?: use tinyxml_STL.lib
etc
You might want to check out some intro C++ tutorials because this is very beginner stuff, not related to TinyXML itself.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Also, in your program (not the library) be sure to set TIXML_USE_STL when compiling. When the compiler processes #includes it is important that the variable is defined the same way as when the library was compiled.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
i have a simple program with the following code:
#include <tinyxml.h>
int main() {
TiXmlDocument xmlfile("test.xml");
xmlfile.LoadFile();
return 0;
}
but when i compile it, i get an unresolved external symbol error:
xml-test error LNK2001: unresolved external symbol "protected: virtual void __thiscall TiXmlDocument::StreamOut(class TiXmlOutStream *)const " (?StreamOut@TiXmlDocument@@MBEXPAVTiXmlOutStream@@@Z)
i just got it today so it's the latest version, i'm using vc7, and i'm linking to tinyxml_stl.lib
what am i missing here?
okay, i realized i hadn't added those files like i was supposed to. now it all works. (yeah, i feel stupid)
I have same problem. Which files I must add that this will be work.
Sorry, my English.
It depends on a lot of things (platform, compiler, what have you added already), but assuming you're using msvc 6 on Windows you need to add one of these to the link list:
tinyxmld.lib (debug)
or
tinyxml.lib (release)
I must have added inyxmld.lib and inyxmld_STL.lib?
Choose whichever one is appropriate.
Choices:
- did you build debug and with no STL: use tinyxmld.lib (there is a "t" on the front; it is not "inyxml.lib")
- did you build debug and WITH STL?: use tinyxmld_STL.lib
- did you build release WITH STL?: use tinyxml_STL.lib
etc
You might want to check out some intro C++ tutorials because this is very beginner stuff, not related to TinyXML itself.
Yes, yes, but if i add only tinyxml_STL i have this error, but if I add tinyxml all its ok. But i want use tinyxml with STL
So you're asking "How do I build TinyXML for STL" ?
From the readme.txt file:
"""Use the compile time #define:
TIXML_USE_STL
"""
Also, in your program (not the library) be sure to set TIXML_USE_STL when compiling. When the compiler processes #includes it is important that the variable is defined the same way as when the library was compiled.
Also, I'd recommend you don't use the libs. TinyXml is very simple at 6 files - just add them to your parent project and compile it in.
lee
Good point :)
Now, all its ok. Thanks for help :)