解决方法:
(1)tools->compiler option->settings->linker里设置Generatedebugging information为 YES
(2)tools->compiler option->Add following commands when calling complier与Addthese commands to the linker command line打勾并各自加入以下命令:-g3
(3)转到programs程序页,把gcc行修改为:gcc.exe -D__DEBUG__,把g++行修改为g++.exe -D__DEBUG__ ,点击ok。
(4)重新编译,就能调试了。
2、使用Dev—c++时,如何结决控制台程序运行时的控制台窗口只闪一下就自己关了的问题,解决方案有以下几种
(1)引入#include <conio.h>,并在返回之前使用getch()。对于freopen()也使用。注:此处使用getchar()也不好使
(2)c++引入#include <cstdlib>,返回之前添加system("PAUSE");但对于freopen()不适用。在c中引用<stdlib.h>