首先确定你安装的是codeblocks-13.12mingw-setup.exe,该版本初次运行程序会报错如下:
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文件夹,所以更改路径名为你Code:Blocks的安装目录下的MinGW文件夹(默认好像是:C:\Program Files (x86)\CodeBlocks\MinGW\ ),ok后就可以运行程序了。(解决问题的话请点个赞^_^)