Qt-源码部分编译-C++

该文详细介绍了如何使用一系列编译选项配置Qt,包括选择开源版本、MSVC2013编译器、开发者模式以及跳过特定模块的编译。在配置完成后,使用nmake&nmakeinstall进行编译和安装。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

-debug 只编译出 debug 版本,是默认选项(相对于 -release 选项)
-debug-and-release 两种版本都编译
-opensource 使用 opensource 版本的Qt(相对于 -commercial 选项)
-c++11 打开 C++11 的支持
-shared 使用共享库,是默认选项(相对于 -static 选项)
-skip 移除某模块
-make 添加编译的部分:libs, tools, examples (相对于 -nomake)
-iconv 开启 iconv 的支持
-mp MSVC 多进程编译加速
-developer-build Compile and link Qt with Qt developer options (including auto-tests exporting)
-no-openssl 不编译 openssl
-no-iconv 不编译 iconv
-no-qml-debug 不编译 qml debug 的支持

1.使用编译选项
configure -opensource -platform win32-msvc2013 -developer-build -mp -nomake examples -nomake tests -no-icu -no-openssl -no-iconv -no-qml-debug -skip qtactiveqt -skip qtconnectivity -skip qtdeclarative -skip qtdoc -skip qtenginio -skip qtgraphicaleffects -skip qtimageformats -skip qtlocation -skip qtmultimedia -skip qtquick1 -skip qtquickcontrols -skip qtscript -skip qtsensors -skip qtserialport -skip qtsvg -skip qttools -skip qttranslations -skip qtwebchannel -skip qtwebengine -skip qtwebkit -skip qtwebkit-examples -skip qtwebsockets -skip qtxmlpatterns

2.编译并安装
nmake && nmake install

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值