博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
CodeBlocks调试failed(顺带各种编译问题小结)
阅读量:3897 次
发布时间:2019-05-23

本文共 1604 字,大约阅读时间需要 5 分钟。

今天重装了CodeBlocks13.12版本,结果调试的时候出现如下结果:

Building to ensure sources are up-to-date
Selecting target:
Debug
Adding source dir: E:\codeblocksProject\test\test02
Adding source dir: E:\codeblocksProject\test\test02
Adding file: E:\codeblocksProject\test\test02\bin\Debug\test02.exe
Changing directory to: E:/codeblocksProject/test/test02/.
Set variable: PATH=.;D:\SoftWare\IDE\CodeBlocks\MinGW\bin;D:\SoftWare\IDE\CodeBlocks\MinGW;C:\Program Files\Microsoft MPI\Bin;C:\ProgramData\Oracle\Java\javapath;C:\Windows\System32;C:\Windows;C:\Windows\System32\wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Windows\System32\OpenSSH;D:\SoftWare\SQLServer备用目录\140\Tools\Binn;D:\SoftWare\SQLServer\140\Tools\Binn;D:\SoftWare\SQLServer备用目录\140\DTS\Binn;D:\SoftWare\SQLServer\140\DTS\Binn;D:\SoftWare\SQLServer\Client SDK\ODBC\130\Tools\Binn;C:\Users\liushuihanbin\AppData\Local\Microsoft\WindowsApps
Starting debugger: D:\SoftWare\IDE\CodeBlocks\MinGW\bin\gdb32.exe -nx -fullname -quiet -args E:/codeblocksProject/test/test02/bin/Debug/test02.exe
failed
为了测试是否为路径等问题,特定找了一个纯英文目录来测试,结果如下图,还是失败
在这里插入图片描述
于是在网上找了很久解决方法,最后终于解决了。原来我的Settings-Debugger-Default设置的Executable path设置的是D:\SoftWare\IDE\CodeBlocks\MinGW\bin\gdb32.exe,而在我的CodeBlocks的安装路径下的MinGW文件夹里D:\SoftWare\IDE\CodeBlocks\MinGWMinGW\bin中只有gdb.exe…难怪会出错!(其实看到红色就应该想到是错了)将路径中的32删除,确认就行。
当然,你们应该根据自己的gdb路径去选择
在这里插入图片描述
在这里插入图片描述
顺便总结一下其他编译不了的情况:
1.确保没有工程的路径不包含中文(最好没有空格)
2.确定自己打开的是一个工程
3.确定Settings-Compiler-Global Compiler Settings的Toolchain Executable的路径选择正确:
一般可以Auto-Detected,不行的话选择"…"手动找到自己CodeBlocks的安装路径里的MinGW,选择就行。
在这里插入图片描述
4.还有就是上述我的情况,确保Settings-Debugger-Default设置的Executable path的正确
先总结到这里。

转载地址:http://wyfen.baihongyu.com/

你可能感兴趣的文章
Webkit之HTMLInput分析
查看>>
WebKit之UserAgent分析
查看>>
Webkit之HTMLToken处理
查看>>
Webkit之HTMLTokenizer分析
查看>>
Webkit之平台相关层
查看>>
Webkit之UI层布局
查看>>
WebKit之InlineBox绘制阶段顺序
查看>>
WebKit之图像显示分析流程
查看>>
WebKit之addToJavaScriptWindowObject()分析
查看>>
资源之收集列表整理
查看>>
JS之kindeditor的用法简介
查看>>
Linux之最简字符驱动的编码模型
查看>>
服务之Windows平台上搭建SVN服务
查看>>
Python之封装diff命令的项目比较命令(格式化diff输出结果)
查看>>
Shell之定时拉起脚本
查看>>
Shell之导出数据库的表为Excel的脚本
查看>>
Shell之预启动脚本
查看>>
WebKit之Node的继承关系图
查看>>
WebKit之RenderObject继承关系图整理
查看>>
WebKit之JSCell的继承关系图
查看>>