针对codeblocks无法使用的问题的解决方案
在刚安装好的 codeblocks上 可能 出现 无法运行的情况并 出现以下错误信息
“helloWord - Debug”: The compiler’s setup (GNU GCC Compiler) is invalid, so Code::Blocks cannot find/run the compiler. Probably the toolchain path within the compiler options is not setup correctly?! (Do you have a compiler installed?) Goto “Settings->Compiler…->Global compiler settings->GNU GCC Compiler->Toolchain executables” and fix the compiler’s setup. Skipping… Nothing to be done (all items are up-to-date).
其实 就是缺少配置文件 或 配置文件的根目录位置不对
根据提示 打开 Settings->Compiler…->Global compiler settings->GNU GCC Compiler->Toolchain executables
我们可以看到 默认目录地址为C:MinGW
下面 提示 找不到
如果 没有 MinGW这个文件 下载地址 :
一般 最好 解压到 codeblocks 的根目录下
然后在 Settings->Compiler…->Global compiler settings->GNU GCC Compiler->Toolchain executables
修改根 地址 我的是 D:codeblocksMinGW
接下来运行程序 就没有问题了