Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linker error when using TinyXml2 in VS2010 #126

Closed
vigneshrams opened this issue Aug 19, 2013 · 3 comments
Closed

Linker error when using TinyXml2 in VS2010 #126

vigneshrams opened this issue Aug 19, 2013 · 3 comments

Comments

@vigneshrams
Copy link

Hi Lee,

I am using TinyXML already which is working great. Thought of trying TinyXML2 but when i created a sample project and added tinyxm2.cpp/tinyxml.h and when complied i get linker errors as,
tinyxml2.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __cdecl tinyxml2::XMLText::SetCData(bool)" (_imp?SetCData@XMLText@tinyxml2@@QEAAX_N@Z) referenced in function "public: char * __cdecl tinyxml2::XMLDocument::Identify(char *,class tinyxml2::XMLNode * *)" (?Identify@XMLDocument@tinyxml2@@QEAAPEADPEADPEAPEAVXMLNode@2@@z)
1>tinyxml2.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) protected: __cdecl tinyxml2::XMLText::XMLText(class tinyxml2::XMLDocument *)" (_imp??0XMLText@tinyxml2@@iEAA@PEAVXMLDocument@1@@z) referenced in function "public: char * __cdecl tinyxml2::XMLDocument::Identify(char *,class tinyxml2::XMLNode * *)" (?Identify@XMLDocument@tinyxml2@@QEAAPEADPEADPEAPEAVXMLNode@2@@z)
1>tinyxml2.obj : error LNK2001: unresolved external symbol "public: virtual class tinyxml2::XMLElement const * __cdecl tinyxml2::XMLNode::ToElement(void)const " (?ToElement@XMLNode@tinyxml2@@UEBAPEBVXMLElement@2@XZ)
1>tinyxml2.obj : error LNK2001: unresolved external symbol "public: virtual class tinyxml2::XMLElement * __cdecl tinyxml2::XMLNode::ToElement(void)" (?ToElement@XMLNode@tinyxml2@@UEAAPEAVXMLElement@2@XZ)
1>tinyxml2.obj : error LNK2001: unresolved external symbol "public: virtual class tinyxml2::XMLText const * __cdecl tinyxml2::XMLNode::ToText(void)const " (?ToText@XMLNode@tinyxml2@@UEBAPEBVXMLText@2@XZ)
1>tinyxml2.obj : error LNK2001: unresolved external symbol "public: virtual class tinyxml2::XMLText * __cdecl tinyxml2::XMLNode::ToText(void)" (?ToText@XMLNode@tinyxml2@@UEAAPEAVXMLText@2@XZ)
1>tinyxml2.obj : error LNK2001: unresolved external symbol "public: virtual class tinyxml2::XMLComment const * __cdecl tinyxml2::XMLNode::ToComment(void)const " (?ToComment@XMLNode@tinyxml2@@UEBAPEBVXMLComment@2@XZ)
1>tinyxml2.obj : error LNK2001: unresolved external symbol "public: virtual class tinyxml2::XMLComment * __cdecl tinyxml2::XMLNode::ToComment(void)" (?ToComment@XMLNode@tinyxml2@@UEAAPEAVXMLComment@2@XZ)
1>tinyxml2.obj : error LNK2001: unresolved external symbol "public: virtual class tinyxml2::XMLDocument const * __cdecl tinyxml2::XMLNode::ToDocument(void)const " (?ToDocument@XMLNode@tinyxml2@@UEBAPEBVXMLDocument@2@XZ)
1>tinyxml2.obj : error LNK2001: unresolved external symbol "public: virtual class tinyxml2::XMLDocument * __cdecl tinyxml2::XMLNode::ToDocument(void)" (?ToDocument@XMLNode@tinyxml2@@UEAAPEAVXMLDocument@2@XZ)
1>tinyxml2.obj : error LNK2001: unresolved external symbol "public: virtual class tinyxml2::XMLDeclaration const * __cdecl tinyxml2::XMLDeclaration::ToDeclaration(void)const " (?ToDeclaration@XMLDeclaration@tinyxml2@@UEBAPEBV12@XZ)
1>tinyxml2.obj : error LNK2001: unresolved external symbol "public: virtual class tinyxml2::XMLDeclaration * __cdecl

@stbrowne
Copy link

Can you share the sample project file? I'm using VS2010 and have had no issues so far.

@vigneshrams
Copy link
Author

thanks a lot. I got it resolved myself.

@amireh
Copy link

amireh commented Jul 8, 2016

@vigneshrams can you tell us how you resolved it? I'm coming across this as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants