codeblocks常见问题

时间:2024-03-30 18:11:50

codeblocks常见问题

记录一下在使用codeblocks中经常出现的问题和解决方法

一、中文乱码问题

出现问题:
1.error: converting to execution character set: Illegal byte sequence
2.error: failure to convert GBK to UTF-8
3.没有提示信息,直接全部乱码
解决方法:
有用的只有一种
1.先检查 菜单栏->settings->Editor…->Configure editor界面->Encoding settings中的配置是否是UTF-8,确认是之后进行下一步
codeblocks常见问题
2.菜单栏->settings->compiler->Global compiler settings界面->other compiler options
在other compiler options这个原本是空白界面的地方添上配置:
-finput-charset=UTF-8
-fexec-charset=GBK

codeblocks常见问题
codeblocks常见问题
codeblocks常见问题
第一次出现这个问题时,添上这两句话就解决了,但后来又出现了这个问题,解决的方法是 :删除这两句话。
之后又出现了这个问题,现在又加上了这两句。

二、WARNING: Can’t read file’s timestamp:文件名

发现问题:在codeblocks的项目中,该文件存在,但发现在原文件夹中,该文件已不存在
解决方法:将该文件重新添加到项目的原文件夹中,再在codeblocks中重新Add files添加该文件,保存,重新运行

三、在菜单栏->settings->compiler->Global compiler settings界面中,不小心修改了Compiler Flags

原始选项是第三个
codeblocks常见问题