您的位置:首页 > 编程语言 > C语言/C++

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

2011-11-06 10:00 411 查看
方法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
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息