Uga*_*uga 4 qt openssl build visual-c++ qt5
使用SSL支持构建Qt5的正确配置是什么?我目前使用以下命令行使用VC2008静态编译OpenSSL:
perl Configure VC-WIN32 --prefix=C:\Build-OpenSSL-VC-32
ms\do_ms
nmake -f ms\nt.mak
nmake -f ms\nt.mak install
Run Code Online (Sandbox Code Playgroud)
配置Qt 5.3.1:
configure -developer-build -opensource -nomake examples -nomake tests -mp -confirm-license -opengl desktop -no-icu -skip qtserialport -skip qtwebkit-examples -platform win32-msvc2008 -openssl-linked OPENSSL_LIBS="-lssleay32 -llibeay32" -I C:\Build-OpenSSL-VC-32\include -L C:\Build-OpenSSL-VC-32\lib
Run Code Online (Sandbox Code Playgroud)
我得到多个链接错误,如
moc_qnetworkreply.obj : error LNK2001: unresolved external symbol "public: bool __thiscall QSslCertificate::operator==(class QSslCertificate const &)const " (??8QSslCertificate@@QBE_NABV0@@Z)
Run Code Online (Sandbox Code Playgroud)
如何将Qt编译与OpenSSL支持链接?我究竟做错了什么?
好吧最后我发现在重新配置之前清理配置非常重要.在以前版本的Qt中nmake confclean做了诀窍,但似乎它不再起作用了.根据QTBUG-34304,现在用它来git submodule foreach --recursive "git clean -dfx"代替nmake confclean.之后,需要对gdi32.lib和user32.ilb进行一些调整才能获得以下配置行:
configure -developer-build -opensource -nomake examples -nomake tests -mp -confirm-license -opengl desktop -no-icu -skip qtserialport -skip qtwebkit-examples -platform win32-msvc2008 -openssl-linked OPENSSL_LIBS="-lssleay32 -llibeay32" -I C:\Build-OpenSSL-VC-32\include -L C:\Build-OpenSSL-VC-32\lib -L "C:\Program Files\Microsoft SDKs\Windows\v6.0A\Lib" -l Gdi32 -l User32
Run Code Online (Sandbox Code Playgroud)
然后
nmake
Run Code Online (Sandbox Code Playgroud)
和Voilà.
| 归档时间: |
|
| 查看次数: |
8896 次 |
| 最近记录: |