Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

mingw g++ gives warnings in wrong language (german instead of english)

Tags:

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
like image 544
Traspler Avatar asked Apr 17 '12 12:04

Traspler


People also ask

What is the difference between GCC and MinGW?

GCC (GNU Compiler Collection) is a free and open source compiler for C and C++ (and other languages like Objective-C, Fortran, D). MinGW-w64 is a free and open source C library for targetting Windows 32-bit and 64-bit platforms. The combination of these results in a free C/C++ compiler for Windows.

Does MinGW include G ++?

Gcc distributions such as mingw provide a gcc executable which can be used to compile files in any language the distribution supports. They also provide other compiler drivers, which in the case of mingw are executables such as g++, c++, g77, etc.

What is G ++ and MinGW?

MinGW is "Minimalist GNU for Windows", The GNU toolchain is a set of apps that helps with building applications (and more). In that toolchain there is the GNU compiler collection GCC. The c++ compiler within that collection is g++. Follow this answer to receive notifications.

Does MinGW contain GCC?

MinGW includes a port of the GNU Compiler Collection (GCC), GNU Binutils for Windows (assembler, linker, archive manager), a set of freely distributable Windows specific header files and static import libraries which enable the use of the Windows API, a Windows native build of the GNU Project's GNU Debugger, and ...


1 Answers

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.

like image 61
Traspler Avatar answered Oct 19 '22 00:10

Traspler