[分享]关于在Code::Blocks中将汉语的“警告”解析成“Error"的解决方法

软件和网站开发以及相关技术探讨
回复
头像
skies457
帖子: 291
注册时间: 2008-08-11 14:35
来自: Galaxy 581

[分享]关于在Code::Blocks中将汉语的“警告”解析成“Error"的解决方法

#1

帖子 skies457 » 2008-11-11 21:20

The easiest way is to use an english environment for compiling inside C::B !
Go to "Settings -> Environment... -> Envirinment variables", add "LC_ALL" and set its value to "en_US" or "en_US.UTF-8" for example.
That only changes the environment variable inside C::B, your normal system will not be touched.

The hard way would be to change the regexes C::B us in "Settings -> Compiler and debugger... -> Global compiler settings -> Other settings -> Advanced options... -> Output parsing".
But I don't know if the last possibility would work for chinese characters.
翻译:
最容易的方式是在C::B中使用英文环境!
去“Settings -> Environment... -> Envirinment variables“中,添加“LC_ALL”变量,并设置成列如“en_US“或"en_US.UTF-8"的值。
这只改变了C::B中的环境变量,你的正常系统不会被改变。
困难的方式会改变C::B中的正则表达式,在“Settings -> Compiler and debugger... -> Global compiler settings -> Other settings -> Advanced options... -> Output parsing“中改变。
但我并不清楚在最坏的可能性下是否会对中文字符起作用。
我按照第一种方法试了,非常有效。
原文地址:http://forums.codeblocks.org/index.php/ ... l#msg67229
回复