c++ - Xerces C++ Unresolved 链接器错误

标签 c++ xml windows-7 visual-studio-2005 xerces-c

我正在使用 VS2005 为我创建的模式生成和构建 Xerces .hxx/.cxx 文件。我能够生成模式并编译它们,但是在链接时我收到了以下链接器错误。我将 xerces-c_3D.lib 包含到 Linker->Input->Additional Dependencies 选项卡中。它似乎找到了。因为当我从 Linker->General->Additional Library Directories 中取出位置时 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:\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 ==========

最佳答案

简单的答案是将 Properties->C/C++->Language->Treat WChar_t As Built in Type 设置为 No(/Zc:wchar_t-)

关于c++ - Xerces C++ Unresolved 链接器错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10506582/

相关文章:

c# - 使用 xamarin studio 进行 windows 7 桌面应用程序开发

c++ - 是否有任何 std::istream 操纵器从输入中使用预定义的字符串?

c++ - 替代过剩

c++ - 在 Visual Studio 2015 中使用 QCharts 时未解析的外部符号

java - 我如何从 CLASSPATH 中引用 XSD 来验证我的 XML?

java - 删除操作栏按钮的 android :title,?

c++ - 无锁 fifo 缓冲区中的删除节点检测

来自 XML 文件的 C# 类(源代码)生成器

c# - 在 Windows 7 上获取有用的错误消息

c - 如何在 Eclipse IDE 中运行简单的 C 程序