Xerces C++未解决的链接器错误

Xerces C++ unresolved linker error

本文关键字:错误 链接 C++ 未解决 Xerces      更新时间:2023-10-16

我正在使用VS2005为我创建的模式生成和构建Xerces .hxx/.cxx文件。 我能够生成架构并编译它们,但在链接时我收到了以下链接器错误。 我将 xerces-c_3D.lib 包含在 Linker->Input->Other Dependencies 选项卡中。它似乎找到了。 因为当我从 Linker->General->附加库目录中取出位置时,VS 抱怨它找不到 xerces-c_3D.lib

我使用 http://wiki.codesynthesis.com/Using_XSD_with_Microsoft_Visual_Studio 来设置项目。

我还尝试构建其中一个示例应用程序,并在设置包含和库后构建它不会失败。 我什至在 vs 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:UsersMCADocumentsVisual Studio 2010ProjectsProjectAlphaProjectBlue_2005DebugProjectBlue.exe : fatal error LNK1120: 31 unresolved externals
1>Build log was saved at "file://C:UsersMCADocumentsVisual Studio 2010ProjectsProjectAlphaProjectBlue_2005DebugBuildLog.htm"
1>ProjectBlue - 62 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

简单的答案是将 Properties->C/C++->Language->Treat WChar_t 视为内置类型设置为 No(/Zc:wchar_t-(

相关文章: