在Windows上构建PoDoFo -未解决的外部
Building PoDoFo on Windows - unresolved externals
我正在尝试构建PoDoFo,但我有一些与OpenSSL相关的链接器错误(我认为)。我试图构建它(OpenSSL),但它太复杂了,所以我从http://slproweb.com/products/Win32OpenSSL.html下载了Win64 OpenSSL v1.0.1e。
我做了Visual Studio解决方案从这个代码:
del cmakecache.txt
set FTDIR=D:IwanProjektyPDF_projektfreetype-2.4.11
set FTLIBDIR=D:IwanProjektyPDF_projektfreetype-2.4.11objswin32vc2010
set JPEGDIR=D:IwanProjektyPDF_projektjpeg-9
set ZLIBDIR=D:IwanProjektyPDF_projektzlib127-dll
set LIBCRYPTODIR=C:OpenSSL-Win64
cmake -G "Visual Studio 10" ..podofo-0.9.2 -DCMAKE_INCLUDE_PATH="%FTDIR%include;%JPEGDIR%include;%JPEGDIR%;%ZLIBDIR%include;%LIBCRYPTODIR%include;%LIBCRYPTODIR%includeopenssl" -DCMAKE_LIBRARY_PATH="%FTLIBDIR%;%FTDIR%lib;%JPEGDIR%lib;%JPEGDIR%;%ZLIBDIR%lib;%LIBCRYPTODIR%libVC" -DPODOFO_BUILD_SHARED:BOOL=TRUE -DFREETYPE_LIBRARY_NAMES_DEBUG=freetype2411MT_D -DFREETYPE_LIBRARY_NAMES_RELEASE=freetype2411MT -DLIBCRYPTO_LIBRARY_NAMES_DEBUG=libeay32MDd -DLIBCRYPTO_LIBRARY_NAMES_RELEASE=libeay32MD
我不确定我应该在选项中添加什么库,但我尝试了libeay32MD, sleay32MD, libeay32MT, ssleay32MT, libeay32和ssleay32。
当我尝试编译创建的解决方案时,我得到了这些链接器错误:
2>LINK : warning LNK4098: defaultlib 'LIBCMTD' conflicts with use of other libs; use /NODEFAULTLIB:library
2>LINK : warning LNK4098: defaultlib 'LIBCMT' conflicts with use of other libs; use /NODEFAULTLIB:library
2>PdfEncrypt.obj : error LNK2019: unresolved external symbol _EVP_CIPHER_CTX_init referenced in function "public: __thiscall PoDoFo::AESCryptoEngine::AESCryptoEngine(void)" (??0AESCryptoEngine@PoDoFo@@QAE@XZ)
2>PdfEncrypt.obj : error LNK2019: unresolved external symbol _EVP_CIPHER_CTX_cleanup referenced in function "public: __thiscall PoDoFo::AESCryptoEngine::~AESCryptoEngine(void)" (??1AESCryptoEngine@PoDoFo@@QAE@XZ)
2>PdfEncrypt.obj : error LNK2019: unresolved external symbol _EVP_EncryptFinal_ex referenced in function "protected: void __thiscall PoDoFo::PdfEncryptRC4Base::RC4(unsigned char const *,int,unsigned char const *,int,unsigned char *,int)" (?RC4@PdfEncryptRC4Base@PoDoFo@@IAEXPBEH0HPAEH@Z)
2>PdfEncrypt.obj : error LNK2019: unresolved external symbol _EVP_EncryptUpdate referenced in function "protected: void __thiscall PoDoFo::PdfEncryptRC4Base::RC4(unsigned char const *,int,unsigned char const *,int,unsigned char *,int)" (?RC4@PdfEncryptRC4Base@PoDoFo@@IAEXPBEH0HPAEH@Z)
2>PdfEncrypt.obj : error LNK2019: unresolved external symbol _EVP_CIPHER_CTX_set_key_length referenced in function "protected: void __thiscall PoDoFo::PdfEncryptRC4Base::RC4(unsigned char const *,int,unsigned char const *,int,unsigned char *,int)" (?RC4@PdfEncryptRC4Base@PoDoFo@@IAEXPBEH0HPAEH@Z)
2>PdfEncrypt.obj : error LNK2019: unresolved external symbol _EVP_EncryptInit_ex referenced in function "protected: void __thiscall PoDoFo::PdfEncryptRC4Base::RC4(unsigned char const *,int,unsigned char const *,int,unsigned char *,int)" (?RC4@PdfEncryptRC4Base@PoDoFo@@IAEXPBEH0HPAEH@Z)
2>PdfEncrypt.obj : error LNK2019: unresolved external symbol _EVP_rc4 referenced in function "protected: void __thiscall PoDoFo::PdfEncryptRC4Base::RC4(unsigned char const *,int,unsigned char const *,int,unsigned char *,int)" (?RC4@PdfEncryptRC4Base@PoDoFo@@IAEXPBEH0HPAEH@Z)
2>PdfEncrypt.obj : error LNK2019: unresolved external symbol _MD5_Final referenced in function "public: static void __cdecl PoDoFo::PdfEncryptMD5Base::GetMD5Binary(unsigned char const *,int,unsigned char *)" (?GetMD5Binary@PdfEncryptMD5Base@PoDoFo@@SAXPBEHPAE@Z)
2>PdfEncrypt.obj : error LNK2019: unresolved external symbol _MD5_Update referenced in function "public: static void __cdecl PoDoFo::PdfEncryptMD5Base::GetMD5Binary(unsigned char const *,int,unsigned char *)" (?GetMD5Binary@PdfEncryptMD5Base@PoDoFo@@SAXPBEHPAE@Z)
2>PdfEncrypt.obj : error LNK2019: unresolved external symbol _MD5_Init referenced in function "public: static void __cdecl PoDoFo::PdfEncryptMD5Base::GetMD5Binary(unsigned char const *,int,unsigned char *)" (?GetMD5Binary@PdfEncryptMD5Base@PoDoFo@@SAXPBEHPAE@Z)
2>PdfEncrypt.obj : error LNK2019: unresolved external symbol _EVP_aes_128_cbc referenced in function "protected: void __thiscall PoDoFo::PdfEncryptAESBase::AES(unsigned char const *,int,unsigned char const *,unsigned char const *,int,unsigned char *,int)" (?AES@PdfEncryptAESBase@PoDoFo@@IAEXPBEH00HPAEH@Z)
我试图做编译这个2天,但没有我做的工作,我在互联网上找不到任何东西。
您需要自己构建OpenSSL。这并没有那么复杂——下面是相关的命令列表,取自install。W64文件捆绑源代码:
> perl Configure VC-WIN64A
> msdo_win64a
> nmake -f msntdll.mak
> cd out32dll
> ..mstest
这里没有提到的你应该在visual studio的命令提示符(工具菜单)中运行它。Perl在这里是不可见的,所以您应该先运行一个命令:
set path=%path;c:perlbin
相关文章:
- 节俭并发:未解决的外部问题
- 未解决的外部链接问题
- Visual Studio 2017 中的 QtMetaObject 未解决的外部错误
- 在Embarcadero C++ Builder中生成的DLL未解决的外部链接错误
- 解释未解决的外部C++
- 矛盾的未解决的外部符号+未使用的库与VS2017和FFMPEG 4
- 函数路径追加上未解决的外部符号错误
- Lapack函数DGTSV通过C /Visual Studio提供未解决的外部符号
- 运算符过载上未解决的外部符号
- qfilesystemwatcher未解决的外部
- C 未解决的外部符号(公共静态INT)
- MIDL COM库中未解决的外部符号
- 未解决的外部符号sf ::带有SFML的时间
- C++编译错误LNK2019:未解决的外部符号错误
- VTK / ITK/ QT - 未解决的外部符号错误 (LNK2001)
- 未解决的外部包括AUX_KLIB内核库
- 单一实例对象的未解决外部符号链接错误
- 导出类静态常量的未解决外部符号链接错误(仅限某些项目)
- C++非常简单的未解决外部
- 如何纠正不一致的未解决外部错误