2013-03-27 77 views
0

你好我想升级项目,该项目已经在建的32位到64位的Windows 7,我有这样的Xerces 2_7链接xerces2_7.dll应用程序中使用的DLL所以我下载的源代码用于xerces2_7_0版本并以64位构建库。直到这里没问题。但是,当我试图通过它钩这个库到我的项目会引发链接器错误。下面是无法与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)" ([email protected]@[email protected]@[email protected]@[email protected]@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" ([email protected]@[email protected]@2QBGB) 
error LNK2001: unresolved external symbol "__declspec(dllimport) public: static unsigned short const * const xercesc_2_7::XMLUni::fgDOMValidateIfSchema" ([email protected]@[email protected]@2QBGB) 
error LNK2001: unresolved external symbol "__declspec(dllimport) public: static unsigned short const * const xercesc_2_7::XMLUni::fgXercesSchemaFullChecking" ([email protected]@[email protected]@2QBGB) 
error LNK2001: unresolved external symbol "__declspec(dllimport) public: static unsigned short const * const xercesc_2_7::XMLUni::fgXercesSchema" ([email protected]@[email protected]@2QBGB) 
error LNK2001: unresolved external symbol "__declspec(dllimport) public: static unsigned short const * const xercesc_2_7::XMLUni::fgDOMNamespaces" ([email protected]@[email protected]@2QBGB) 
error LNK2019: unresolved external symbol "__declspec(dllimport) public: static class xercesc_2_7::DOMImplementation * __cdecl xercesc_2_7::DOMImplementationRegistry::getDOMImplementation(unsigned short const *)" ([email protected]@[email protected]@[email protected]@[email protected]) referenced in function "private: bool __cdecl 

所以我怀疑我是否真的建立了这个XERCES在64位2_7_0和写的测试项目中的64位控制台应用程序,并试图钩住这个XERCES库和能够成功构建项目的错误(使用同一组,我在我的项目制作)

我用的Dependency Walker检查所有的依赖通话; 当我试图在我的64位的Xerces DLL我发现在打开文件错误的Dependency Walker,下面是错误的:

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 Studio 2008 感谢

Update 1: 好吧我在这里减少的Dependency Walker错误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. 

另2个错误是因为依赖学步车我使用的是32位可执行文件。现在我正在使用64位依赖walker,但仍然看到2个错误。

Update 2: 我通过将CRT更改为/ MT来摆脱了2个错误。但是我仍然无法将这个图书馆与我的项目联系起来。

+0

*错误:找到具有不同CPU类型的模块*似乎并不是所有的Xerces库都是针对64位构建的。我会单独检查每个项目的设置,以确保选择正确的体系结构。而Xerces 2.7在2005年左右发布,任何你无法使用最新版本的原因? – Praetorian 2013-03-27 16:05:14

+0

同样的事情发生在xercess 2.8中,我试过3.0,但似乎有些功能发生了变化,我不想在我的项目中做出巨大的改变 – Vivek 2013-03-27 18:00:16

回答

0

我想通了。这是语言设置的问题。在Configuration Properties - >C/C++ - >LanguageTreat wchar_t as Built in Type在那里为我建立的Xerces库选项设置为yes设置为No在我的项目。

这使得区别。

相关问题