关于Codeblocks出现Could not auto-detect installation path of "GNU GCC Compiler"... 的解决办法
1、使用Codeblocks编译时报错
报错如下:
Project/Target: “PROJECTNAME - Debug/Release”:
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.
Tried to run compiler executable 'C:\Users\SOMEONE\Applications\CodeBlocks\MinGW/bin/mingw32-gcc.exe', but failed!
2、解决办法,下载带有MINGW的安装包,如下
1、进入官网https://www.codeblocks.org/
2、选择 DownLoads
3、选择二进制下载 > Download the binary release
4、根据你的使用情况选择 windows 或者 linux ,(下面以windows为例),选择>Windows XP / Vista / 7 / 8.x / 10
5、选择下图箭头指向的安装包
图片:
6、Next
7、Next
8、选择你要安装的路径,Install 即可
8、安装好打开工程就可以编译成功了