Compiler errors 代码合成XSD:来自Xerces的未解析外部

Compiler errors 代码合成XSD:来自Xerces的未解析外部,compiler-errors,xsd,symbols,xerces,codesynthesis,Compiler Errors,Xsd,Symbols,Xerces,Codesynthesis,在修复一个大错误之后,下一个错误就会发生 这一次我有39个未解决的外部问题,从Xerces看它是什么样子,但一个小时后我想不出是什么。还下载了新文件并将其添加到项目属性中 情境:我在CodeSynthesis-XSD上用XSD方案生成了Cpp文件。现在我想用控制台应用程序(QT5)在Visual Studio 10中测试该方案 error LNK2001: unresolved external symbol "__declspec(dllimport) public: static char

在修复一个大错误之后,下一个错误就会发生

这一次我有39个未解决的外部问题,从Xerces看它是什么样子,但一个小时后我想不出是什么。还下载了新文件并将其添加到项目属性中

情境:我在
CodeSynthesis-XSD
上用
XSD方案生成了Cpp文件。现在我想用控制台应用程序(QT5)在Visual Studio 10中测试该方案

error LNK2001: unresolved external symbol "__declspec(dllimport) public: static char const * const xercesc_3_1::XMLUni::fgXercescDefaultLocale" (__imp_?fgXercescDefaultLocale@XMLUni@xercesc_3_1@@2QBDB)
error LNK2001: unresolved external symbol "__declspec(dllimport) public: static class xercesc_3_1::MemoryManager * xercesc_3_1::XMLPlatformUtils::fgMemoryManager" (__imp_?fgMemoryManager@XMLPlatformUtils@xercesc_3_1@@2PAVMemoryManager@2@A)
error LNK2001: unresolved external symbol "__declspec(dllimport) public: static wchar_t const * const xercesc_3_1::XMLUni::fgDOMComments" (__imp_?fgDOMComments@XMLUni@xercesc_3_1@@2QB_WB)
error LNK2001: unresolved external symbol "__declspec(dllimport) public: static wchar_t const * const xercesc_3_1::XMLUni::fgDOMDatatypeNormalization" (__imp_?fgDOMDatatypeNormalization@XMLUni@xercesc_3_1@@2QB_WB)
error LNK2001: unresolved external symbol "__declspec(dllimport) public: static wchar_t const * const xercesc_3_1::XMLUni::fgDOMElementContentWhitespace" (__imp_?fgDOMElementContentWhitespace@XMLUni@xercesc_3_1@@2QB_WB)
这是39个错误中的5个,我想如果我把其余的34个错误贴出来,也不会有多大帮助

可能是我以错误的方式生成了
cxx/hxx


xsd-cxx-tree$filepath$

您似乎还没有将程序链接到Xerces-c库。很抱歉,我对Visual Studio 10一无所知,我已经通过VC++目录(bin/lib/include)和附加依赖项中的.lib链接了它。当我还链接xerces dll时,未解析的符号将消失,但我无法编译它,因为“LNK1107:无效或损坏的文件:无法在0x2F0读取”。在google上,你只看到你应该链接.lib而不是.dll,但是我得到了未解决的错误…还有一个提示:根据,如果你使用XERCES-C静态库(.lib),你将需要使用XERCES\u STATIC\u库预处理器宏来编译你的应用程序