我遵循https://wiki.qt.io/Building_a_static_Qt_for_Windows_using_MinGW中所述的Qt静态构建指示信息。在我的Windows 10机器上运行脚本可以正常工作并静态构建Qt。但是,由于我需要OpenSSL支持,因此无法使用.ps
脚本生成的静态内部版本编译我的程序。从源代码构建Qt静态启用OpenSSL支持
因此,我略微改变了.ps
脚本的configure.bat
选项从-no-openssl
到
-openssl-linked
-I C:\OpenSSL-Win32\include
-L C:\OpenSSL-Win32\lib\VC\static
OPENSSL_LIBS="-lUser32 -lAdvapi32 -lGdi32 -lCrypt32"
OPENSSL_LIBS_DEBUG=-"lssleay32MTd -llibeay32MTd"
OPENSSL_LIBS_RELEASE="-lssleay32MT -llibeay32MT
使OpenSSL的支持静态的Qt构建的基础上,从anwseres:
QT https SSL support for static QT static program build - getting 'Protocol "https" is unknown'
和
Is there any way to building static Qt with static OpenSSL?
运行脚本现在在make install步骤中不会产生进一步的指定错误。 -lUser32 -lAdvapi32 -lGdi32 -lCrypt32
库不在我的OpenSSL-Win32安装的任何子文件夹中,但可以在C:\Windows\System32\
中找到。
如果你只是删除'-no-openssl'它将恢复到默认值, h是使用SSL提供的平台 – dtech