问题描述
安装好CodeBlocks后,在新建项目下跑“Hello World”,出现报错:Tried to run compiler executable ‘-- No Compiler --/bin/’, but failed!
解决步骤
1.更换安装包
出现该错误的原因是当前安装的CodeBlocks中不含编译器,图中所选安装包是自带编译器的,卸载原软件,安装新的即可解决。
2.配置路径
同时,还需要配置编译器路径。
点击**“Settings->Compiler…->Global compiler settings->GNU GCC Compiler->Toolchain executables”**修改编辑器路径。
3.运行
运行成功。