How to include tinyxml files into my project in visual c++ 6?
Demo compiles properly, but when I create my own project, add instruction to include tinyxml.h and add files: tinyxml.cpp, tinyxml.h, tinyxmlerror.cpp, tinyxmlparser.cpp, and tinystr.cpp to project, I get errors:
--------------------
Compiling...
tinyxml.cpp
D:\Visual Studio 6\MyProjects\kombinacje\tinyxml.cpp(1069) : fatal error C1010: unexpected end of file while looking for precompiled header directive
tinyxmlerror.cpp
D:\Visual Studio 6\MyProjects\kombinacje\tinyxmlerror.cpp(51) : fatal error C1010: unexpected end of file while looking for precompiled header directive
tinyxmlparser.cpp
D:\Visual Studio 6\MyProjects\kombinacje\tinyxmlparser.cpp(940) : fatal error C1010: unexpected end of file while looking for precompiled header directive
tinystr.cpp
D:\Visual Studio 6\MyProjects\kombinacje\tinystr.cpp(266) : fatal error C1010: unexpected end of file while looking for precompiled header directive
--------------------
When I only include tinyxml.h, I get errors:
--------------------
Linking...
kombinacje.obj : error LNK2001: unresolved external symbol "protected: virtual class TiXmlNode * __thiscall TiXmlDocument::Clone(void)const " (?Clone@TiXmlDocument@@MBEPAVTiXmlNode@@XZ)
kombinacje.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall TiXmlDocument::StreamOut(class TiXmlOutStream *)const " (?StreamOut@TiXmlDocument@@MBEXPAVTiXmlOutStream@@@Z)
kombinacje.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall TiXmlDocument::Print(struct _iobuf *,int)const " (?Print@TiXmlDocument@@UBEXPAU_iobuf@@H@Z)
kombinacje.obj : error LNK2001: unresolved external symbol "public: virtual __thiscall TiXmlNode::~TiXmlNode(void)" (??1TiXmlNode@@UAE@XZ)
kombinacje.obj : error LNK2001: unresolved external symbol "public: virtual char const * __thiscall TiXmlDocument::Parse(char const *)" (?Parse@TiXmlDocument@@UAEPBDPBD@Z)
kombinacje.obj : error LNK2001: unresolved external symbol "public: __thiscall TiXmlDocument::TiXmlDocument(char const *)" (??0TiXmlDocument@@QAE@PBD@Z)
Release/kombinacje.exe : fatal error LNK1120: 6 unresolved externals
--------------------
It should be simple to solve, but not for beginner :(
Thanks in advance
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
add #include "stdafx.h" as the first command in the .cpp files
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2003-03-19
... and the second way is to switch off using of precompiled headers for TinyXML's .cpp files (Project Settings -> C/C++ tab -> category (combo) "Precompiled headers" -> option "Not using precompiled headers").
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
How to include tinyxml files into my project in visual c++ 6?
Demo compiles properly, but when I create my own project, add instruction to include tinyxml.h and add files: tinyxml.cpp, tinyxml.h, tinyxmlerror.cpp, tinyxmlparser.cpp, and tinystr.cpp to project, I get errors:
--------------------
Compiling...
tinyxml.cpp
D:\Visual Studio 6\MyProjects\kombinacje\tinyxml.cpp(1069) : fatal error C1010: unexpected end of file while looking for precompiled header directive
tinyxmlerror.cpp
D:\Visual Studio 6\MyProjects\kombinacje\tinyxmlerror.cpp(51) : fatal error C1010: unexpected end of file while looking for precompiled header directive
tinyxmlparser.cpp
D:\Visual Studio 6\MyProjects\kombinacje\tinyxmlparser.cpp(940) : fatal error C1010: unexpected end of file while looking for precompiled header directive
tinystr.cpp
D:\Visual Studio 6\MyProjects\kombinacje\tinystr.cpp(266) : fatal error C1010: unexpected end of file while looking for precompiled header directive
--------------------
When I only include tinyxml.h, I get errors:
--------------------
Linking...
kombinacje.obj : error LNK2001: unresolved external symbol "protected: virtual class TiXmlNode * __thiscall TiXmlDocument::Clone(void)const " (?Clone@TiXmlDocument@@MBEPAVTiXmlNode@@XZ)
kombinacje.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall TiXmlDocument::StreamOut(class TiXmlOutStream *)const " (?StreamOut@TiXmlDocument@@MBEXPAVTiXmlOutStream@@@Z)
kombinacje.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall TiXmlDocument::Print(struct _iobuf *,int)const " (?Print@TiXmlDocument@@UBEXPAU_iobuf@@H@Z)
kombinacje.obj : error LNK2001: unresolved external symbol "public: virtual __thiscall TiXmlNode::~TiXmlNode(void)" (??1TiXmlNode@@UAE@XZ)
kombinacje.obj : error LNK2001: unresolved external symbol "public: virtual char const * __thiscall TiXmlDocument::Parse(char const *)" (?Parse@TiXmlDocument@@UAEPBDPBD@Z)
kombinacje.obj : error LNK2001: unresolved external symbol "public: __thiscall TiXmlDocument::TiXmlDocument(char const *)" (??0TiXmlDocument@@QAE@PBD@Z)
Release/kombinacje.exe : fatal error LNK1120: 6 unresolved externals
--------------------
It should be simple to solve, but not for beginner :(
Thanks in advance
add #include "stdafx.h" as the first command in the .cpp files
... and the second way is to switch off using of precompiled headers for TinyXML's .cpp files (Project Settings -> C/C++ tab -> category (combo) "Precompiled headers" -> option "Not using precompiled headers").