Tinyxml2: VS2010でTinyXml2を使用する際のリンカーエラー

作成日 2013年08月19日  ·  3コメント  ·  ソース: leethomason/tinyxml2

こんにちはリー、

私はすでにTinyXMLを使用していますが、これはうまく機能しています。 TinyXML2を試してみようと思ったのですが、サンプルプロジェクトを作成してtinyxm2.cpp / tinyxml.hを追加し、コンパイルすると、次のようなリンカーエラーが発生します。
tinyxml2.obj:エラーLNK2019:未解決の外部シンボル "__declspec(dllimport)public:void __cdecl tinyxml2 :: XMLText :: SetCData(bool)"(__ imp_?SetCData @ XMLText @ tinyxml2 @@ QEAAX_N @ Z)関数 "public: char * __cdecl tinyxml2 :: XMLDocument :: Identify(char *、class tinyxml2 :: XMLNode * *) "(?Identify @ XMLDocument @ tinyxml2 @@ QEAAPEADPEADPEAPEAVXMLNode @ 2 @@ Z)
1> tinyxml2.obj:エラーLNK2019:未解決の外部シンボル "__declspec(dllimport)protected:__ cdecl tinyxml2 :: XMLText :: XMLText(class tinyxml2 :: XMLDocument *)"(__ imp _ ?? 0XMLText @ tinyxml2 @@ IEAA @ PEAVXMLDocument @ 1 @@ Z)関数 "public:char * __cdecl tinyxml2 :: XMLDocument :: Identify(char *、class tinyxml2 :: XMLNode * *)"(?Identify @ XMLDocument @ tinyxml2 @@ QEAAPEADPEADPEAPEAVXMLNode @ 2 @@ Z)で参照
1> tinyxml2.obj:エラーLNK2001:未解決の外部シンボル "public:仮想クラスtinyxml2 :: XMLElement const * __cdecl tinyxml2 :: XMLNode :: ToElement(void)const"(?ToElement @ XMLNode @ tinyxml2 @@ UEBAPEBVXMLElement @ 2 @ XZ )。
1> tinyxml2.obj:エラーLNK2001:未解決の外部シンボル "public:virtual class tinyxml2 :: XMLElement * __cdecl tinyxml2 :: XMLNode :: ToElement(void)"(?ToElement @ XMLNode @ tinyxml2 @@ UEAAPEAVXMLElement @ 2 @ XZ)
1> tinyxml2.obj:エラーLNK2001:未解決の外部シンボル "public:仮想クラスtinyxml2 :: XMLText const * __cdecl tinyxml2 :: XMLNode :: ToText(void)const"(?ToText @ XMLNode @ tinyxml2 @@ UEBAPEBVXMLText @ 2 @ XZ )。
1> tinyxml2.obj:エラーLNK2001:未解決の外部シンボル "public:virtual class tinyxml2 :: XMLText * __cdecl tinyxml2 :: XMLNode :: ToText(void)"(?ToText @ XMLNode @ tinyxml2 @@ UEAAPEAVXMLText @ 2 @ XZ)
1> tinyxml2.obj:エラーLNK2001:未解決の外部シンボル "public:仮想クラスtinyxml2 :: XMLComment const * __cdecl tinyxml2 :: XMLNode :: ToComment(void)const"(?ToComment @ XMLNode @ tinyxml2 @@ UEBAPEBVXMLComment @ 2 @ XZ )。
1> tinyxml2.obj:エラーLNK2001:未解決の外部シンボル "public:virtual class tinyxml2 :: XMLComment * __cdecl tinyxml2 :: XMLNode :: ToComment(void)"(?ToComment @ XMLNode @ tinyxml2 @@ UEAAPEAVXMLComment @ 2 @ XZ)
1> tinyxml2.obj:エラーLNK2001:未解決の外部シンボル "public:仮想クラスtinyxml2 :: XMLDocument const * __cdecl tinyxml2 :: XMLNode :: ToDocument(void)const"(?ToDocument @ XMLNode @ tinyxml2 @@ UEBAPEBVXMLDocument @ 2 @ XZ )。
1> tinyxml2.obj:エラーLNK2001:未解決の外部シンボル "public:virtual class tinyxml2 :: XMLDocument * __cdecl tinyxml2 :: XMLNode :: ToDocument(void)"(?ToDocument @ XMLNode @ tinyxml2 @@ UEAAPEAVXMLDocument @ 2 @ XZ)
1> tinyxml2.obj:エラーLNK2001:未解決の外部シンボル "public:仮想クラスtinyxml2 :: XMLDeclaration const * __cdecl tinyxml2 :: XMLDeclaration :: ToDeclaration(void)const"(?ToDeclaration @ XMLDeclaration @ tinyxml2 @@ UEBAPEBV12 @ XZ)
1> tinyxml2.obj:エラーLNK2001:未解決の外部シンボル "public:仮想クラスtinyxml2 :: XMLDeclaration * __cdecl

最も参考になるコメント

@vigneshramsどのように解決したか教えていただけますか? 私もこれに出くわしています。

全てのコメント3件

サンプルプロジェクトファイルを共有できますか? 私はVS2010を使用していますが、これまでのところ問題はありません。

どうもありがとう。 私はそれを自分で解決しました。

@vigneshramsどのように解決したか教えていただけますか? 私もこれに出くわしています。

このページは役に立ちましたか?
0 / 5 - 0 評価

関連する問題

kurylo picture kurylo  ·  5コメント

leethomason picture leethomason  ·  4コメント

KerstinKeller picture KerstinKeller  ·  5コメント

MortenMacFly picture MortenMacFly  ·  18コメント

ajtruckle picture ajtruckle  ·  9コメント