codeblocks找不到编译器

@妖啊先生

刚装了codeblocks运行不了,显示这个东西

"HelloWorld - Debug": The compiler's setup (GNUGCC Compiler) is invalid, so Code::Blocks cannot find/run the compiler.


Probably the toolchain path within the compiler optionsis not setup correctly?! (Do you have a compiler installed?)


Goto "Settings->Compiler...->Global compilersettings->GNU GCC Compiler->Toolchain executables" and fix thecompiler's setup.


Skipping...


Nothing to be done (all items are up-to-date).

Target uses an invalid compiler; run aborted

大概是找不到编译器
解决方法,安装MINGW(以win10 64位为例)

MINGW64下载

不用安装直接直接配置环境变量,我的电脑->右键属性->高级设置->环境变量->
找到path添加    E:\CodeBlocks\MinGW64\bin(看自己文件路径)
codeblocks找不到编译器
然后确定
验证是否成功添加环境   win+r   输入cmd回车,输入gcc -v回车

codeblocks找不到编译器
打开codeblocks进行设置
codeblocks找不到编译器
codeblocks找不到编译器

结束