CodeBlocks调试failed(顺带各种编译问题小结)

您所在的位置:网站首页 codeblocksdebug CodeBlocks调试failed(顺带各种编译问题小结)

CodeBlocks调试failed(顺带各种编译问题小结)

#CodeBlocks调试failed(顺带各种编译问题小结)| 来源: 网络整理| 查看: 265

今天重装了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的正确 先总结到这里。



【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3