1

VS2005を使用して、作成したスキーマのXerces .hxx/.cxxファイルを生成およびビルドしています。スキーマを生成してコンパイルすることはできますが、リンクすると、以下のリンカーエラーが発生しました。xerces-c_3D.libを[リンカー]->[入力]->[追加の依存関係]タブに含めました。そしてそれはそれを見つけるようです。Linker-> General-> Additional Library Directories VSから場所を取得すると、xerces-c_3D.libが見つからないと文句を言うからです。

http://wiki.codesynthesis.com/Using_XSD_with_Microsoft_Visual_Studioを使用してプロジェクトをセットアップしました。

また、サンプルアプリケーションの1つをビルドしてみましたが、インクルードとライブラリをセットアップした後、必ずビルドします。私も2010年と同じことを構築して実行しましたが、それは機能します。だから私はどこを見ればいいのか途方に暮れています。

任意の提案をいただければ幸いです。

1>------ Build started: Project: ProjectBlue, Configuration: Debug Win32 ------
1>Linking...
1>UniqueID.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: static unsigned short const * const xercesc_3_1::SchemaSymbols::fgXSI_NONAMESPACESCHEMALOCACTION" (__imp_?fgXSI_NONAMESPACESCHEMALOCACTION@SchemaSymbols@xercesc_3_1@@2QBGB) referenced in function "protected: __thiscall xsd::cxx::zc_istream_base<char>::zc_istream_base<char>(class xsd::cxx::ro_string<char> const &)" (??0?$zc_istream_base@D@cxx@xsd@@IAE@ABV?$ro_string@D@12@@Z)
1>Arch.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static unsigned short const * const xercesc_3_1::SchemaSymbols::fgXSI_NONAMESPACESCHEMALOCACTION" (__imp_?fgXSI_NONAMESPACESCHEMALOCACTION@SchemaSymbols@xercesc_3_1@@2QBGB)
1>ArchDetails.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static unsigned short const * const xercesc_3_1::SchemaSymbols::fgXSI_NONAMESPACESCHEMALOCACTION" (__imp_?fgXSI_NONAMESPACESCHEMALOCACTION@SchemaSymbols@xercesc_3_1@@2QBGB)
1>ArchType.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static unsigned short const * const xercesc_3_1::SchemaSymbols::fgXSI_NONAMESPACESCHEMALOCACTION" (__imp_?fgXSI_NONAMESPACESCHEMALOCACTION@SchemaSymbols@xercesc_3_1@@2QBGB)
1>T6EchoTEC.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static unsigned short const * const xercesc_3_1::SchemaSymbols::fgXSI_NONAMESPACESCHEMALOCACTION" (__imp_?fgXSI_NONAMESPACESCHEMALOCACTION@SchemaSymbols@xercesc_3_1@@2QBGB)
1>TSPI.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static unsigned short const * const xercesc_3_1::SchemaSymbols::fgXSI_NONAMESPACESCHEMALOCACTION" (__imp_?fgXSI_NONAMESPACESCHEMALOCACTION@SchemaSymbols@xercesc_3_1@@2QBGB)
1>UniqueID.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static unsigned short const * const xercesc_3_1::SchemaSymbols::fgXSI_SCHEMALOCACTION" (__imp_?fgXSI_SCHEMALOCACTION@SchemaSymbols@xercesc_3_1@@2QBGB)
1>Arch.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static unsigned short const * const xercesc_3_1::SchemaSymbols::fgXSI_SCHEMALOCACTION" (__imp_?fgXSI_SCHEMALOCACTION@SchemaSymbols@xercesc_3_1@@2QBGB)
1>ArchDetails.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static unsigned short const * const xercesc_3_1::SchemaSymbols::fgXSI_SCHEMALOCACTION" (__imp_?fgXSI_SCHEMALOCACTION@SchemaSymbols@xercesc_3_1@@2QBGB)
1>ArchType.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static unsigned short const * const xercesc_3_1::SchemaSymbols::fgXSI_SCHEMALOCACTION" (__imp_?fgXSI_SCHEMALOCACTION@SchemaSymbols@xercesc_3_1@@2QBGB)
1>T6EchoTEC.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static unsigned short const * const xercesc_3_1::SchemaSymbols::fgXSI_SCHEMALOCACTION" (__imp_?fgXSI_SCHEMALOCACTION@SchemaSymbols@xercesc_3_1@@2QBGB)
1>TSPI.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static unsigned short const * const xercesc_3_1::SchemaSymbols::fgXSI_SCHEMALOCACTION" (__imp_?fgXSI_SCHEMALOCACTION@SchemaSymbols@xercesc_3_1@@2QBGB)
1>UniqueID.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static unsigned short const * const xercesc_3_1::SchemaSymbols::fgURI_XSI" (__imp_?fgURI_XSI@SchemaSymbols@xercesc_3_1@@2QBGB)
1>Arch.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: static unsigned short const * const xercesc_3_1::SchemaSymbols::fgURI_XSI" (__imp_?fgURI_XSI@SchemaSymbols@xercesc_3_1@@2QBGB) referenced in function "public: class std::_Vector_const_iterator<class xercesc_3_1::DOMAttr *,class std::allocator<class xercesc_3_1::DOMAttr *> > & __thiscall std::_Vector_const_iterator<class xercesc_3_1::DOMAttr *,class std::allocator<class xercesc_3_1::DOMAttr *> >::operator+=(int)" (??Y?$_Vector_const_iterator@PAVDOMAttr@xercesc_3_1@@V?$allocator@PAVDOMAttr@xercesc_3_1@@@std@@@std@@QAEAAV01@H@Z)
1>ArchDetails.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static unsigned short const * const xercesc_3_1::SchemaSymbols::fgURI_XSI" (__imp_?fgURI_XSI@SchemaSymbols@xercesc_3_1@@2QBGB)
1>ArchType.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static unsigned short const * const xercesc_3_1::SchemaSymbols::fgURI_XSI" (__imp_?fgURI_XSI@SchemaSymbols@xercesc_3_1@@2QBGB)
1>T6EchoTEC.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static unsigned short const * const xercesc_3_1::SchemaSymbols::fgURI_XSI" (__imp_?fgURI_XSI@SchemaSymbols@xercesc_3_1@@2QBGB)
1>TSPI.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static unsigned short const * const xercesc_3_1::SchemaSymbols::fgURI_XSI" (__imp_?fgURI_XSI@SchemaSymbols@xercesc_3_1@@2QBGB)
1>UniqueID.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static bool __cdecl xercesc_3_1::XMLString::equals(unsigned short const *,unsigned short const *)" (__imp_?equals@XMLString@xercesc_3_1@@SA_NPBG0@Z)
1>Arch.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static bool __cdecl xercesc_3_1::XMLString::equals(unsigned short const *,unsigned short const *)" (__imp_?equals@XMLString@xercesc_3_1@@SA_NPBG0@Z)
1>ArchDetails.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: static bool __cdecl xercesc_3_1::XMLString::equals(unsigned short const *,unsigned short const *)" (__imp_?equals@XMLString@xercesc_3_1@@SA_NPBG0@Z) referenced in function "void __cdecl xsd::cxx::xml::dom::clear<char>(class xercesc_3_1::DOMElement &)" (??$clear@D@dom@xml@cxx@xsd@@YAXAAVDOMElement@xercesc_3_1@@@Z)
1>ArchType.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static bool __cdecl xercesc_3_1::XMLString::equals(unsigned short const *,unsigned short const *)" (__imp_?equals@XMLString@xercesc_3_1@@SA_NPBG0@Z)
1>T6EchoTEC.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static bool __cdecl xercesc_3_1::XMLString::equals(unsigned short const *,unsigned short const *)" (__imp_?equals@XMLString@xercesc_3_1@@SA_NPBG0@Z)
1>TSPI.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static bool __cdecl xercesc_3_1::XMLString::equals(unsigned short const *,unsigned short const *)" (__imp_?equals@XMLString@xercesc_3_1@@SA_NPBG0@Z)
1>UniqueID.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static unsigned short const * const xercesc_3_1::XMLUni::fgXMLNSURIName" (__imp_?fgXMLNSURIName@XMLUni@xercesc_3_1@@2QBGB)
1>Arch.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static unsigned short const * const xercesc_3_1::XMLUni::fgXMLNSURIName" (__imp_?fgXMLNSURIName@XMLUni@xercesc_3_1@@2QBGB)
1>ArchDetails.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static unsigned short const * const xercesc_3_1::XMLUni::fgXMLNSURIName" (__imp_?fgXMLNSURIName@XMLUni@xercesc_3_1@@2QBGB)
1>ArchType.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static unsigned short const * const xercesc_3_1::XMLUni::fgXMLNSURIName" (__imp_?fgXMLNSURIName@XMLUni@xercesc_3_1@@2QBGB)
1>T6EchoTEC.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static unsigned short const * const xercesc_3_1::XMLUni::fgXMLNSURIName" (__imp_?fgXMLNSURIName@XMLUni@xercesc_3_1@@2QBGB)
1>TSPI.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: static unsigned short const * const xercesc_3_1::XMLUni::fgXMLNSURIName" (__imp_?fgXMLNSURIName@XMLUni@xercesc_3_1@@2QBGB) referenced in function "public: __thiscall xsd::cxx::xml::string::~string(void)" (??1string@xml@cxx@xsd@@QAE@XZ)
1>UniqueID.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static unsigned long __cdecl xercesc_3_1::XMLString::stringLen(unsigned short const * const)" (__imp_?stringLen@XMLString@xercesc_3_1@@SAKQBG@Z)
1>Arch.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static unsigned long __cdecl xercesc_3_1::XMLString::stringLen(unsigned short const * const)" (__imp_?stringLen@XMLString@xercesc_3_1@@SAKQBG@Z)
1>ArchDetails.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: static unsigned long __cdecl xercesc_3_1::XMLString::stringLen(unsigned short const * const)" (__imp_?stringLen@XMLString@xercesc_3_1@@SAKQBG@Z) referenced in function "class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl xsd::cxx::xml::transcode<char>(unsigned short const *)" (??$transcode@D@xml@cxx@xsd@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@PBG@Z)
1>ArchType.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static unsigned long __cdecl xercesc_3_1::XMLString::stringLen(unsigned short const * const)" (__imp_?stringLen@XMLString@xercesc_3_1@@SAKQBG@Z)
1>T6EchoTEC.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static unsigned long __cdecl xercesc_3_1::XMLString::stringLen(unsigned short const * const)" (__imp_?stringLen@XMLString@xercesc_3_1@@SAKQBG@Z)
1>TSPI.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static unsigned long __cdecl xercesc_3_1::XMLString::stringLen(unsigned short const * const)" (__imp_?stringLen@XMLString@xercesc_3_1@@SAKQBG@Z)
1>T6EchoTEC.obj : error LNK2001: unresolved external symbol "public: virtual unsigned short const * __thiscall xercesc_3_1::InputSource::getEncoding(void)const " (?getEncoding@InputSource@xercesc_3_1@@UBEPBGXZ)
1>T6EchoTEC.obj : error LNK2001: unresolved external symbol "public: virtual unsigned short const * __thiscall xercesc_3_1::InputSource::getPublicId(void)const " (?getPublicId@InputSource@xercesc_3_1@@UBEPBGXZ)
1>T6EchoTEC.obj : error LNK2001: unresolved external symbol "public: virtual unsigned short const * __thiscall xercesc_3_1::InputSource::getSystemId(void)const " (?getSystemId@InputSource@xercesc_3_1@@UBEPBGXZ)
1>T6EchoTEC.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall xercesc_3_1::InputSource::setEncoding(unsigned short const * const)" (?setEncoding@InputSource@xercesc_3_1@@UAEXQBG@Z)
1>T6EchoTEC.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall xercesc_3_1::InputSource::setPublicId(unsigned short const * const)" (?setPublicId@InputSource@xercesc_3_1@@UAEXQBG@Z)
1>T6EchoTEC.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall xercesc_3_1::InputSource::setSystemId(unsigned short const * const)" (?setSystemId@InputSource@xercesc_3_1@@UAEXQBG@Z)
1>T6EchoTEC.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static unsigned short const * const xercesc_3_1::XMLUni::fgDOMErrorHandler" (__imp_?fgDOMErrorHandler@XMLUni@xercesc_3_1@@2QBGB)
1>T6EchoTEC.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static unsigned short const * const xercesc_3_1::XMLUni::fgXercesLoadSchema" (__imp_?fgXercesLoadSchema@XMLUni@xercesc_3_1@@2QBGB)
1>T6EchoTEC.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static unsigned short const * const xercesc_3_1::XMLUni::fgXercesSchemaExternalNoNameSpaceSchemaLocation" (__imp_?fgXercesSchemaExternalNoNameSpaceSchemaLocation@XMLUni@xercesc_3_1@@2QBGB)
1>T6EchoTEC.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static unsigned short const * const xercesc_3_1::XMLUni::fgXercesSchemaExternalSchemaLocation" (__imp_?fgXercesSchemaExternalSchemaLocation@XMLUni@xercesc_3_1@@2QBGB)
1>T6EchoTEC.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static unsigned short const * const xercesc_3_1::XMLUni::fgXercesUserAdoptsDOMDocument" (__imp_?fgXercesUserAdoptsDOMDocument@XMLUni@xercesc_3_1@@2QBGB)
1>T6EchoTEC.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static unsigned short const * const xercesc_3_1::XMLUni::fgXercesHandleMultipleImports" (__imp_?fgXercesHandleMultipleImports@XMLUni@xercesc_3_1@@2QBGB)
1>T6EchoTEC.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static unsigned short const * const xercesc_3_1::XMLUni::fgXercesSchemaFullChecking" (__imp_?fgXercesSchemaFullChecking@XMLUni@xercesc_3_1@@2QBGB)
1>T6EchoTEC.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static unsigned short const * const xercesc_3_1::XMLUni::fgXercesSchema" (__imp_?fgXercesSchema@XMLUni@xercesc_3_1@@2QBGB)
1>T6EchoTEC.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static unsigned short const * const xercesc_3_1::XMLUni::fgDOMValidate" (__imp_?fgDOMValidate@XMLUni@xercesc_3_1@@2QBGB)
1>T6EchoTEC.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static unsigned short const * const xercesc_3_1::XMLUni::fgDOMElementContentWhitespace" (__imp_?fgDOMElementContentWhitespace@XMLUni@xercesc_3_1@@2QBGB)
1>T6EchoTEC.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static unsigned short const * const xercesc_3_1::XMLUni::fgDOMNamespaces" (__imp_?fgDOMNamespaces@XMLUni@xercesc_3_1@@2QBGB)
1>T6EchoTEC.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static unsigned short const * const xercesc_3_1::XMLUni::fgDOMEntities" (__imp_?fgDOMEntities@XMLUni@xercesc_3_1@@2QBGB)
1>T6EchoTEC.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static unsigned short const * const xercesc_3_1::XMLUni::fgDOMDatatypeNormalization" (__imp_?fgDOMDatatypeNormalization@XMLUni@xercesc_3_1@@2QBGB)
1>T6EchoTEC.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static unsigned short const * const xercesc_3_1::XMLUni::fgDOMComments" (__imp_?fgDOMComments@XMLUni@xercesc_3_1@@2QBGB)
1>T6EchoTEC.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: static class xercesc_3_1::DOMImplementation * __cdecl xercesc_3_1::DOMImplementationRegistry::getDOMImplementation(unsigned short const *)" (__imp_?getDOMImplementation@DOMImplementationRegistry@xercesc_3_1@@SAPAVDOMImplementation@2@PBG@Z) referenced in function "struct xsd::cxx::xml::dom::auto_ptr<class xercesc_3_1::DOMDocument> __cdecl xsd::cxx::xml::dom::parse<char>(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class xercesc_3_1::DOMErrorHandler &,class xsd::cxx::xml::properties<char> const &,unsigned long)" (??$parse@D@dom@xml@cxx@xsd@@YA?AU?$auto_ptr@VDOMDocument@xercesc_3_1@@@0123@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AAVDOMErrorHandler@xercesc_3_1@@ABV?$properties@D@123@K@Z)
1>T6EchoTEC.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) protected: __thiscall xercesc_3_1::InputSource::InputSource(unsigned short const * const,class xercesc_3_1::MemoryManager * const)" (__imp_??0InputSource@xercesc_3_1@@IAE@QBGQAVMemoryManager@1@@Z) referenced in function "public: __thiscall xsd::cxx::xml::sax::std_input_source::std_input_source<char>(class std::basic_istream<char,struct std::char_traits<char> > &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (??$?0D@std_input_source@sax@xml@cxx@xsd@@QAE@AAV?$basic_istream@DU?$char_traits@D@std@@@std@@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@6@@Z)
1>T6EchoTEC.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static unsigned short const * const xercesc_3_1::XMLUni::fgDOMXMLDeclaration" (__imp_?fgDOMXMLDeclaration@XMLUni@xercesc_3_1@@2QBGB)
1>T6EchoTEC.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static unsigned short const * const xercesc_3_1::XMLUni::fgDOMWRTFormatPrettyPrint" (__imp_?fgDOMWRTFormatPrettyPrint@XMLUni@xercesc_3_1@@2QBGB)
1>T6EchoTEC.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static unsigned short const * const xercesc_3_1::XMLUni::fgDOMWRTDiscardDefaultContent" (__imp_?fgDOMWRTDiscardDefaultContent@XMLUni@xercesc_3_1@@2QBGB)
1>C:\Users\MCA\Documents\Visual Studio 2010\Projects\ProjectAlpha\ProjectBlue_2005\Debug\ProjectBlue.exe : fatal error LNK1120: 31 unresolved externals
1>Build log was saved at "file://C:\Users\MCA\Documents\Visual Studio 2010\Projects\ProjectAlpha\ProjectBlue_2005\Debug\BuildLog.htm"
1>ProjectBlue - 62 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
4

1 に答える 1

4

簡単な答えは、[プロパティ]-> [C / C ++]->[言語]->[WChar_tを組み込み型として扱う]をNo(/ Zc:wchar_t-)に設定することです。

于 2012-08-22T21:24:08.290 に答える