QT5.14 windows msvc静态编译 openssl1.1.1

configure -prefix D:\Qt\NewStatic -platform win32-msvc -opensource -debug-and-release -confirm-license -opengl dynamic -mp -static -static-runtime -no-shared -qt-libpng -qt-libjpeg -qt-zlib -qt-pcre -no-compile-examples -nomake examples -no-icu -optimize-size -openssl-linked OPENSSL_PREFIX=C:\Qt\5.14.1\msvc2019-x86-static\openssl-1.1.1d

//openssl目录选择到 能看到include lib bin 就好

C:\Qt\5.14.1\msvc2019-x86-static\openssl-1.1.1d\include
C:\Qt\5.14.1\msvc2019-x86-static\openssl-1.1.1d\bin
C:\Qt\5.14.1\msvc2019-x86-static\openssl-1.1.1d\lib

configure中的参数
OPENSSL_PREFIX=C:\Qt\5.14.1\msvc2019-x86-static\openssl-1.1.1d
就好了

剩下
nmake
nmake install

具体编译参数 可以用configure -help查看
-debug-and-release //编译模式
-opensource //开源协议
-mp //多线程编译
-static -static-runtime//静态

//静态编译需要修改
Src\qtbase\mkspecs\common下的
msvc-desktop.conf
MD改成MT

QMAKE_CFLAGS_RELEASE    = $$QMAKE_CFLAGS_OPTIMIZE -MT
QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += $$QMAKE_CFLAGS_OPTIMIZE -Zi -MT
QMAKE_CFLAGS_DEBUG      = -Zi -MTd

//ps:推荐大神的Qt5编译脚本
链接

configure -prefix D:\MYSDK\QT5 -platform win32-msvc -opensource -debug-and-release -confirm-license -mp -static -static-runtime  -nomake examples -no-icu -optimize-size -skip qt3d -skip qtscript -skip qtmultimedia -skip qttools -skip qttranslations -skip qtwebsockets -skip qtsensors -skip qtserialbus -skip qtserialport -skip qtspeech -skip qtdatavis3d -skip qtcharts -skip qtpurchasing
  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值