繁体   English   中英

无法将xerces2_7.dll与64位应用程序链接

[英]Unable to link xerces2_7.dll with 64 bit application

嗨,我正在尝试将Windows 7上已经以32位构建的项目升级到64位。我在应用程序中使用了xerces 2_7 dll,因此我下载了xerces2_7_0版本的源代码并以64位构建库。 到这里没问题。 但是,当我尝试将此库挂接到我的项目时,会引发链接器错误。 以下是错误

error LNK2019: unresolved external symbol "__declspec(dllimport) public: static bool __cdecl xercesc_2_7::DOMImplementation::loadDOMExceptionMsg(enum xercesc_2_7::DOMException::ExceptionCode,unsigned short * const,unsigned int)" (__imp_?loadDOMExceptionMsg@DOMImplementation@xercesc_2_7@@SA_NW4ExceptionCode@DOMException@2@QEAGI@Z) referenced in function "int `private: bool __cdecl 
error LNK2001: unresolved external symbol "__declspec(dllimport) public: static unsigned short const * const xercesc_2_7::XMLUni::fgDOMDatatypeNormalization" (__imp_?fgDOMDatatypeNormalization@XMLUni@xercesc_2_7@@2QBGB)
error LNK2001: unresolved external symbol "__declspec(dllimport) public: static unsigned short const * const xercesc_2_7::XMLUni::fgDOMValidateIfSchema" (__imp_?fgDOMValidateIfSchema@XMLUni@xercesc_2_7@@2QBGB)
error LNK2001: unresolved external symbol "__declspec(dllimport) public: static unsigned short const * const xercesc_2_7::XMLUni::fgXercesSchemaFullChecking" (__imp_?fgXercesSchemaFullChecking@XMLUni@xercesc_2_7@@2QBGB)
error LNK2001: unresolved external symbol "__declspec(dllimport) public: static unsigned short const * const xercesc_2_7::XMLUni::fgXercesSchema" (__imp_?fgXercesSchema@XMLUni@xercesc_2_7@@2QBGB)
error LNK2001: unresolved external symbol "__declspec(dllimport) public: static unsigned short const * const xercesc_2_7::XMLUni::fgDOMNamespaces" (__imp_?fgDOMNamespaces@XMLUni@xercesc_2_7@@2QBGB)
error LNK2019: unresolved external symbol "__declspec(dllimport) public: static class xercesc_2_7::DOMImplementation * __cdecl xercesc_2_7::DOMImplementationRegistry::getDOMImplementation(unsigned short const *)" (__imp_?getDOMImplementation@DOMImplementationRegistry@xercesc_2_7@@SAPEAVDOMImplementation@2@PEBG@Z) referenced in function "private: bool __cdecl 

因此,我怀疑我是否真的用64位构建了xerces 2_7_0并编写了一个测试项目,并编写了一个64位控制台应用程序,并试图挂钩该xerces库并能够成功构建该项目(使用了我在项目中所做的同一组调用)

我使用了依赖项遍历器来检查所有依赖项; 当我在我的64位xerces dll上尝试使用依赖行者时,发现打开文件时出现错误,以下是错误:

Error: The Side-by-Side configuration information for "c:\users\vivek\desktop\xerces64bit\x64\debug\XERCES64BIT.EXE" contains errors. The application has failed to start because its side-by-side configuration is incorrect. Please see the application event log or use the command-line sxstrace.exe tool for more detail (14001).
Error: At least one required implicit or forwarded dependency was not found.
Error: At least one module has an unresolved import due to a missing export function in an implicitly dependent module.
Error: Modules with different CPU types were found.

任何想法,我在做什么错,以及为什么我的64位测试应用程序都没有抱怨。 顺便说一句,我正在使用Visual Studio2008。谢谢

Update 1:好的,在这里我将依赖行者错误减少到2

Error: The Side-by-Side configuration information for "c:\users\vivek\desktop\xerces64bit\x64\debug\XERCES64BIT.EXE" contains errors. The application has failed to start because its side-by-side configuration is incorrect. Please see the application event log or use the command-line sxstrace.exe tool for more detail (14001).
Error: At least one required implicit or forwarded dependency was not found.

其他两个错误是由于我使用的依赖行者是32位可执行文件。 现在,我正在使用64位依赖项遍历器,但仍然看到2个错误。

Update 2:通过将CRT更改为/ MT,我摆脱了2个错误。 但是我仍然无法将此库与我的项目链接。

我想到了。 这是语言设置的问题。 在我的项目中,在Configuration Properties -> C/C++ -> LanguageTreat wchar_t as Built in Type设置为No ,这是因为我在构建xerces库时将选项设置为yes。

有所作为。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM