当前位置:网站首页>Qt development application debug and release settings
Qt development application debug and release settings
2022-07-22 13:25:00 【Progress every day 2015】
Generally speaking ,release Version of the executable program is smaller than debug The version is much smaller ( Several times or even tens of times the difference ), Moreover, due to the stripping of many debugging information and symbols, the operation efficiency is relatively higher . But in use Qt Occasionally, we will encounter timely choices during development release Version generated Binary system The document is still a huge problem . So check the relevant settings carefully , Ensure that the last version released is release edition .
1、 Premise : It's generating Qt library (./configure) Already configured as + -debug-and-release
If configured as ./configure -release, Can only generate release edition
A simple configuration description is attached as follows
-release ........... Debugging off . There is no debug library , Your own projects can only be published , Can't debug ( There is no debugging Library ), If you insist on compiling debug Version! , Will prompt that xxxxxd.dll
* -debug ............. Only debug libraries , No release Library , In other words, you can only debug your own projects in the future , If you insist on compiling debug Version! , Will prompt that xxxxx.dll
+ -debug-and-release . After compilation, there are two kinds of libraries . It is best to compile two kinds of libraries
2、Qt Createor Set up
stay creator Of Projects Tab , Build settings (Build Settings), If there is a lack of Debug perhaps Release, Click on Add Select corresponding QtSDK Version can .
stay Build Steps in qmake step , If it is Debug You need to add parameters :CONFIG+=debug.
3、pro file ( Optional )
Be careful : If in Qt Creator Set the construction parameters ,pro The file does not have to be set repeatedly .
CONFIG+=debug_and_release
CONFIG(debug,debug|release)
{
unix:TARGET=$$join(TARGET,,,_debug)
win32:TARGET=$$join(TARGET,,d)
}
make or make debug -------debug edition
make release -------release edition
make all ------- Both versions generate
Generate Makefile There is QT_NO_DEBUG Parameters
4、 shielding release All in version QDebug() Prompt information :
If you want to output the command line without typing all qdebug Information , Can be in pro Add... To the file DEFINES+=QT_NO_DEBUG_OUTPUT
边栏推荐
- :class在项目中的使用
- How to select the type of ankerui intelligent miniature circuit breaker?
- mapState
- Operating principle of JVM
- el-input 失去焦点事件
- One bite of Stream(8)
- 如何正确使用call、bind、apply
- [mysql] basic database operations
- Addition, deletion, query and modification of [mdsql] table (Advanced)
- [where can I buy hcip question bank?]
猜你喜欢
Congratulations on the successful convening of the product innovation management forum of innovation empowerment on July 16
uniapp 实现抽奖幸运大转盘功能
(Applied intelligence-2022) transgait: gait recognition and ensemble transformer based on multimodality
el-pinut number取消数字操作符号
Itop-rk3568 development board Debian system function test - wired network test
Qt程序打包发布方法(使用官方提供的windeployqt工具)
El pinut number cancel number operation symbol
如何在页面中添加地图
Clickhouse installation
机器学习-集成学习
随机推荐
El pinut number cancel number operation symbol
边框动态效果实现
The difference between join on followed by condition and where followed by condition
Addition, deletion, query and modification of [mdsql] table (Advanced)
Qt Creator快捷键大全,附快捷键配置方法
2022/07/18------顺时针打印矩阵
"New energy + energy storage" starts from the digital twin, Tupu will make smart power to the extreme
mySQL基本函数
The LAAS solution of elephant swap has risen rapidly and built a new defi2.0 protocol
uniapp常用的生命周期
如何正确使用call、bind、apply
(Applied Intelligence-2022)TransGait: 基于多模态的步态识别与集合Transformer
Qt开发应用程序Debug与Release设置
Congratulations on the successful convening of the product innovation management forum of innovation empowerment on July 16
How to wirelessly transmit the liquid level value of asphalt high-level tank to the heat carrier recorder for monitoring?
Daily question-leetcode814-binary tree pruning recursion
Typescript - quick start
el-input 失去焦点事件
[MySQL must know and know] stored procedure | cursor
Supply chain collaborative management system of pharmaceutical machinery industry: full link digital coverage to realize the visualization of industrial supply chain