我单独讨论如下的两类问题:
1 ERROR: You need to specify a debugger program in the debuggers’s settings.
(For MinGW compilers, it’s ‘gdb.exe’ (without the quotes))
(For MSVC compilers, it’s ‘cdb.exe’ (without the quotes))
2 在点击调试后,失败,下面出现
In ?? () ()
Cannot find bounds of current function?
Solution:
1.转载https://blog.csdn.net/uestc_c2_403/article/details/78914222 这位兄台意思是,在安装CodeBlocks时,没有加自带的MinGW,因此需要自行安装,链接他也给了
2.这是我出现的问题,在使用了1方法后。因为1方法我下载之后,在bin里面缺少gdb.exe。百度的解决方法是,自己在网上下载,并复制过去,结果是我还是失败。
最后,我终于找到了最简单也好用的方法。我把codeblocks删除。在官网上重新安装(http://www.codeblocks.org/downloads/26)
我装了codeblocks-17.12-setup.exe 以及codeblocks-17.12mingw-setup.exe
安装位置随意,最后在 Settings - Debug - Default - Executable path 中导入之前安装的CodeBlocks\MinGW\bin\gdb32.exe,大功告成