簡體   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