codeblocks如何设置编译器

来源:互联网 发布:大数据交易 编辑:程序博客网 时间:2024/05/17 04:42

其实codeblocks设置编译器很简单,没有我们想象的那么复杂,我在这个问题上面走了一趟弯路,于是觉得有必要在这里记录一下下。

首先,gcc , g++ 是一定要装的,为了调试方便,GDB debugger也是一定要装的,接下来就要设置他们了。

Settings -> Compiler -> Selected Compiler要选择 GNU GCC Compiler (我第一次选的Intel C++ Compiler,结果错的海深),在下面的 Toolchain executables 里面 , Compiler's Installation directory,选择 gcc,g++所在的文件夹(或者,如果系统能够auto-detect的话,我们就不用自己设置了),确保C Compiler 是 gcc , C++ Compiler 是 g++,Debugger是 GDB debugger。

做完这些之后,重启codeblocks,新建一个project,写一个c++的helloWorld程序,build -> run ,成功!

1 0
原创粉丝点击