mingw g++ 以错误的语言给出警告(德语而不是英语) [英] mingw g++ gives warnings in wrong language (german instead of english)
问题描述
我的问题如下:
当我在 Windows 7 笔记本电脑上使用 eclipse(Juno,64 位,Java 7u3)编译 C++ 项目时,我收到德语错误/警告.这会导致警告在 Eclipse 中显示为错误.
Windows(7、64 位)设置为:
显示语言:英语
格式:德语(瑞士)
位置:瑞士
非 Unicode 程序的语言:英语(加拿大)
在我的另一台 Windows 7(64 位)PC 上,我的设置完全相同,没有任何问题.
我试过:
- 在我的 eclipse.ini 文件末尾添加 -Duser.language=en.
哪个不起作用 - 将格式更改为英文.
这实际上有效但不是由于其他地方格式错误,确实是一个选择 - 许多不同的事情我不记得了(例如蚀等)
同样,没有任何帮助
我终于解决了 :D
我刚刚添加了一个新的环境变量.我仍然不知道为什么它可以在一台计算机上运行(因为我没有设置这个变量),但至少它最终也可以在我的笔记本电脑上运行,并且(我认为)是一个很好的(正确的?)解决方案:
控制面板 -> 系统 -> 高级系统设置 -> 环境变量... ->系统变量 -> New.. -> 变量:LC_ALL,值:en_US.UTF-8>
现在我在编译时有英文警告/错误,并且 eclipse 表现正常.
My problem is the following:
When I compile a C++ Project with eclipse (Juno, 64bit, Java 7u3) on my Windows 7 laptop, I get german errors/warnings. This results in warnings showing as errors in eclipse.
Windows (7, 64bit) is set to:
Display Language: English
Format: German (Switzerland)
Location: Switzerland
Language for non Unicode programs: English (Canada)
On my other Windows 7 (64bit) PC I have the exact same settings and don't have any problems.
I tried:
- Adding -Duser.language=en to the end of my eclipse.ini file.
Which did not work - Changing the Format to English.
Which actually worked but is not really an option due to the wrong format in other places - Many different things I can't remember (e.g. Environment variables in
eclipse, etc.)
Again, nothing helped
I finally solved it :D
I just added a new environment varibale. I still have no clue why it works on one computer (as on that one I have not set this variable) but at least it finally works on my laptop as well and is (I think) a good (the correct?) solution:
Control Panel -> System -> Advanced System Settings -> Environment Varibales... -> System variables -> New.. -> Variable: LC_ALL, Value: en_US.UTF-8
Now I have english warnings/errors when I compile and eclipse behaves as it should.
这篇关于mingw g++ 以错误的语言给出警告(德语而不是英语)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!