多语言展示
当前在线:697今日阅读:168今日分享:49

CodeBlocks的安装和具体配置

在安装CodeBlocks时有很多新手会遇到如下的错误:XXXX: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?!Goto 'Settings->Compiler and debugger...->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).这主要是由于没有正确配置GCC编译器引起的。下面介绍如何正确安装及避免此类错误。
工具/原料

codeblocks-13.12mingw-setup-TDM-GCC-481

一、下载软件
1

建议从官网上下载包含有编译器版本的CodeBlocks如下图这个文件即可

二、安装软件
1

下载后双击进行安装,下图选项全部勾选

2

系统自动选择第一个编译器作为默认的编译器

3

成功完成安装

三、测试
1

新建一个test工程

2

代码如下:#include using namespace std;int main(){    cout << 'Hello world!' << endl;    return 0;}

3

按F9运行程序,正常输出结果

推荐信息