如何解决Code::Blocks编译时报错
的有关信息介绍如下:安装上Code::Blocks便迫不及待的试试手,可总是报错,其实提示已经很清楚。CodeBlocks找不到编译器,你需要设置一下Code::Blocks的编译器,那么和小北一起试试吧。报错如下:
"CodeBlock - 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).
第一步,打开Code::Blocks,点击菜单栏Settings选项;
点击第三个Compiler ;
第二步,选择左侧Global compiler settings;
Selectedcompiler选择GNU GCC Compiler(如下图)
选择Toolchain executables选项;查看编译器根目录;
第三步,找到Code::Blocks安装目录下的自带编译器目录(如下图,小北的是MinGW,如果不是自带的就找到您安装的编译器的目录)。
第四步,将上一步找到的编译器根目录复制进去(如下图);
点击确认。
第五步,重新打开,然后进行编译,没有报错,说明配置成功了。