现在的位置: 首页 > 综合 > 正文

如何使用Dev C++调试(debug)c程序

2013年10月05日 ⁄ 综合 ⁄ 共 564字 ⁄ 字号 评论关闭

方法1:(已验证)

在“工具”-》编译选项-》"Add following commands when calling complier"下面的编辑框里加上: -g3
然后在下面的"Add these commands to the linker command line" 下的编辑框上加上: -g3

转到programs页,把gcc行修改为:gcc.exe -D__DEBUG__

把g++行修改为: g++.exe -D__DEBUG__ ,

点击ok。
重新编译,就能调试了。

方法2:(本人未验证)

在dev c++ 环境中,写程序的时候,写了一个类,但是有点问题,想调试一下,但是调试的时候,老出现这个问题

your project does not have debugging info, do you want to enable debugging and rebuild your project?

在网上搜了一下解决方法

在 tools --> compiler options --> compiler, 有一个选项是:

Add these commands to the linker command line

将此选项勾选,并将内容 添加为 -g3 -gstabs

转自http://www.cnblogs.com/leelike/archive/2011/01/14/1935682.html

抱歉!评论已关闭.