我刚刚升级到Qt 5.6.0。我注意到了一些以前没有注意到的东西。现在,Qt Creator中的一个新项目获得了三个构建配置:“发行版”,“调试”和“配置文件”。在我看来,“配置文件”是新的。如果是这样,它的目的是什么?
最佳答案
当我查看“项目”->“构建步骤”->“有效的qmake调用”时,
我发现了这个额外的CONFIGS:
"CONFIG+=force_debug_info" "CONFIG+=separate_debug_info"
我也为他们找到了some comments,可以阐明为什么需要这样做:
Hello all,
once more I'm preparing a Qt 5 build for profiling purposes and wonder again why there is no way to combine -release and -debug in Qt's configure script. The only way to get a sane build for profiling Qt code itself that I know of is hacking the mkspec and ensuring that -g is added even in -release mode.
Is there any reason for that? Could we improve this situation somehow to make it simpler to get a Qt build with optimizations and debug symbols?
Am I missing the recommended way to get this done?
此选项生成发行版本(具有所有编译器优化功能),但带有测试C++性能所需的调试符号(pdb文件)。
关于qt5 - 构建配置 "profile"有什么作用?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36126360/