Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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
like image 989
Luchnik Avatar asked May 02 '14 12:05

Luchnik


People also ask

How do I select toolchain in eclipse?

Open Project Properties and go to the Tool Chain Editor under the C/C++ Build section. Select Cross GCC in the Current Toolchain selection box. Select the Settings section right above Tool Chain Editor under C/C++ Build. On the Tool Settings tab, select the Cross Settings item at the very top.

How do I find my MinGW path?

In the Windows search bar, type 'settings' to open your Windows Settings. Search for Edit environment variables for your account. Choose the Path variable in your User variables and then select Edit. Select New and add the Mingw-w64 destination folder path to the system path.

Can we use MinGW for C?

Log in to your regular user account. Download this MinGW folder and run it. Your browser may warn that "This file is not commonly downloaded and may harm your computer" , but run it anyway.


2 Answers

  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.

like image 190
rufushuang Avatar answered Sep 22 '22 23:09

rufushuang


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

like image 22
Meric Ozcan Avatar answered Sep 24 '22 23:09

Meric Ozcan