QMAKE * .pro-file:在发布模式下启用调试信息 [英] QMAKE *.pro-file: enable debugging info in release mode

查看:690
本文介绍了QMAKE * .pro-file:在发布模式下启用调试信息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

因为兼容性问题,我编译我的项目在VS2008在发布模式,但我需要访问调试信息。这就是为什么我在发布模式的项目属性中手动设置调试设置。在VS2008中,我打开Properties窗口并选择:

because of compatibility issues, I compile my project in VS2008 in release mode, but I need to access debug information. That is why I manually set up debugging settings in project properties for release mode. In VS2008, I open Properties window and select:


  1. 配置属性/ C / C ++ / Optimization = Disable / Od

  2. 配置属性/ C / C ++ /链接器/生成调试信息=是(/ Zi)
  3. / DEBUG)
  1. Configuration Properties/C/C++/Optimization = Disable /Od
  2. Configuration Properties/C/C++/General/Debug Information Format = Program Database (/Zi)
  3. Configuration Properties/C/C++/Linker/Generate Debug Info = Yes (/DEBUG)

我使用一个pro文件来配置项目的vcproj文件。每次我改变这个pro文件,我必须重新加载我的项目,调试设置丢失。我想将上面提到的三个设置包括在pro文件中,以便在更改后,我不需要再次设置调试设置。

I use a pro-file to configure my project's vcproj-file. Every time I alter this pro-file, I have to reload my project and the the debug settings are lost. I want to include three settings mentioned above into the pro-file, so that after changing it, I do not need to set up debugging settings again.

我已经google了我也在 QT参考中查看了我的问题。 a>,但我找不到任何东西。我很乐意收到任何建议!

I have already googled and I have also looked my question up in QT reference, but I could not find anything. I will be happy to receive any suggestion!

推荐答案

好的,我已经想出来了。

OK guys, I have figured it out.

在QMAKE文件 myproject.pro 中,插入以下命令:

In the QMAKE file myproject.pro, insert following commands:

QMAKE_CXXFLAGS_RELEASE += /Zi 
QMAKE_CXXFLAGS_RELEASE += /Od
QMAKE_LFLAGS_RELEASE += /DEBUG

这应该可以工作!

这篇关于QMAKE * .pro-file:在发布模式下启用调试信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆