Search code examples
cgccmingweclipse-cdt

How to force Eclipse CDT MinGW toolchain to use mingw32-g++.exe?


I am using Eclipse CDT and MinGW to do C development on Windows 8.1.

I have unpacked company internal MinGW package and just copied it to c:\MinGW, so it was not installer. I also added c:\MinGW\bin to path.

When I run Eclipse CDT, it does detect MinGW toolchain. However, after I set up a C project and tell it to use MinGW toolchain, and build it, I see in the console output the C compiler used is gcc, and I would like to use mingw32-g++.exe.

How do I define this in Eclipse CDT?

I checked project Properties\C C++ Build\Tool Chain Editor\ and under used tools I see the following:

  • GCC Assembler
  • GCC Archiver
  • GCC C++ Compiler
  • GCC C Compiler
  • MinGW C Linker
  • MinGW C++ Linker

Solution

  • The compiler is defined under project properties \C C++ Build\Settings\Tool Settings. Here one should select GCC Compiler and specify mingw32-g++ or just g++, or whichever compiler is desired.