codeblock 常见问题

目录

目录

1.代码中有中文。编译出现错误

2.编译后,点击运行,还是提示没有编译

1.代码中有中文。编译出现错误

关于codeblock的编码问题可以参考博文

  codeblock error: converting to execution character set: Illegal byte sequenc

a.点击settings - > Editor,在Encoding settings 设置编码UTF-8,这样文件的编码就是utf-8

 b.点击 Settings -> Compiler 进入页面后 左侧选择“Global complier settings”,右侧选择 compiler settings ->Other resource compiler optioon中输入,这样就会按照设置的编码读取文件。按指定的字符集生成可执行文件

-fexec-charset=GBK
-finput-charset=UTF-8

 

 

 如果还报错,请用记事本打开源代码文件。点击 文件 -> 另存为... ,

 在弹出的另存为窗口中设置文件编码为 utf-8

2.编译后,点击运行,还是提示没有编译

编译后 ,点击运行按钮,系统总是提示:

It seems that this project has not been built yet.
Do you want to build it now?

如下图所示

 解决办法:

首先要检查编译结果是否正常

 根据错误提示信息解决。

  有时是因为没有配置编译选项

点击文件右键菜单  properites

 

弹出菜单中勾选debug  或者 release 至少一个编译选项

猜你喜欢

转载自blog.csdn.net/caohongxing/article/details/127326044