Eclipse can't find my MinGW toolchain for C/C++

36,813

Solution 1

  1. Setting PATH variable, add something like: "C:\Program Files (x86)\mingw-w64\i686-6.2.0-win32-dwarf-rt_v5-rev1\mingw32\bin"
  2. DO COPY gcc.exe to mingw32-gcc.exe in your path above

For more information, see: http://wiki.eclipse.org/CDT/User/FAQ#I_installed_MinGW_toolchain_on_my_PC_but_Eclipse_won.27t_find_it.

Solution 2

This steps helped me when I faced the same problem:

First add the MinGW directory to your path system environment variable as in this link:

(https://www.youtube.com/watch?v=zLpaYVIoXqc)

After this when you want to create a project uncheck "Show project types and toolchains only if they are supported on the platorm" option. Choose MinGW GCC

Create your code but first build it with CTRL+B, after this mine worked perfectly.

I wish it will be helpful for other people who see this

Solution 3

I also had this problem recently. I had some difficulty getting my Eclipse Luna SR2 4.4.2 running on Win 7 SP1 to see my newly-installed MinGW-w64 but I was able to resolve it by adding a MINGW_HOME environmental variable to my Win 7 installation, and then restarting Eclipse. (I didn't need to restart Windows.)

In my case, MinGW-w64 had installed itself at "C:Program Files\mingw-w64\x86_64-4.9.2-win32-seh-rt_v4_rev2" and so I needed to set MINGW_HOME to "C:Program Files\mingw-w64\x86_64-4.9.2-win32-seh-rt_v4_rev2\mingw64" so that it would point to the appropriate subdirectories (bin, etc, include, lib, ...).

In Win 7, environmental variables can be set via the "Environment Variables" button on the Control Panel -> System and Security -> System -> Advanced system settings. I added my MINGW_HOME variable to the "User variables" section.

Solution 4

Eclipse uses the system environment variable "PATH" to find a toolchain. So, in order to Eclipse could find MinGW toolchain, the path the to bin-directory of MinGW (e.g. "C:\MinGW\bin") should be specified in the "PATH" environment variable.

P.S. And don't forget to re-launch Eclipse after modifying the environment variable :)

Share:
36,813
Luchnik
Author by

Luchnik

Updated on July 11, 2022

Comments

  • Luchnik
    Luchnik almost 2 years

    I have a problem. Many have the same question but I didn't find the answer.

    I installed gcc-4.9.0 on my PC but Eclipse won't find it. I used the default installation path:

    C:\MinGW