问题描述
我试图在代码块中运行一个简单的链表程序,但是我无法运行该程序,并且出现以下错误:
I am trying to run a simple linked list program in code blocks, but I am not able to run the program and i getting the below error :
Active debugger config: GDB/CDB debugger:
Default Building to ensure sources are up-to-date Selecting target:
Debug 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))
我尝试了Stack Overflow此处给出的一些帖子,但是该设置已经存在于代码块中。
I tried some of the posts given here on Stack Overflow, but that setting is already there in the code blocks.
推荐答案
找出 gdb.exe
在任何GCC工具链中的位置您
与Code :: Blocks一起使用,例如:-
Find out where gdb.exe
is located in whatever GCC toolchain youare using with Code::Blocks, e.g:-
- 对于MinGW:C:\MingGW\bin\ \gdb.exe,
- 对于mingw-w64:C:\mingw-w64\x86_64-5.2.0-posix-seh-rt_v4-rev0\mingw64\bin\ \gdb.exe
- 对于TDM-GCC:C:\TDM-GCC-64\bin\gdb.exe
如果找不到它,那么问题的根源是已经(不再)安装调试器
。
If you can't find it then the root of the problem is that the debugger is (no longer)installed.
如果找到它,则在设置-> 调试器设置-> GDB / CDB调试器-> 中输入其完整路径名>默认-> 可执行路径。
Code :: Blocks将检查您输入的路径名,如果找不到,则编辑字段将变为红色。否则,请排除
,然后调试器将开始工作。
If you find it, then enter its full pathname in Settings -> Debugger settings -> GDB/CDB debugger -> Default -> Executable path.Code::Blocks will check the pathname you enter and if it can't find it then the edit-field will turn red. Otherwise, OK outand the debugger will then work.
如果目录包含 gdb.exe
在 PATH
中,则只需在字段中输入 gdb.exe
。
If the directory containing gdb.exe
is in your PATH
then you can simply enter gdb.exe
in the field.
这篇关于代码块调试问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!