Reputation: 1087
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
Upvotes: 9
Views: 44507
Reputation: 11
A mismatch of 32 and 64 bit versions of eclipse and mingw can also contribute the gcc/g++ not-found problem. Make sure you stick to one version all the way from java, mingw, to eclipse.
Upvotes: 0
Reputation: 68
OPEN ECLIPSE > WINDOW (view image) > BUILD > ENVIRONMENT (view image) > and click the Select button you can see your variable list and Select the PATH variable and press ok button. (view image) > after this done you can edit the value of PATH put your path of mingw eg:'C:\mingw64\bin' after the semi colon';' and apply and close then restart the eclipse its done.(view image)
Upvotes: 1
Reputation: 9
As indicated in the above steps one thing I missed to do was saving user settings after adding the path variable. This suggested that the path for MinGW was not saved correctly.
Please check-in that aspect as well.
Upvotes: 0
Reputation: 151
After updating the environment path variable, you must restart os.
Upvotes: -1
Reputation: 818
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
Upvotes: 2
Reputation: 300
For more information, see: http://wiki.eclipse.org/CDT/User/FAQ#I_installed_MinGW_toolchain_on_my_PC_but_Eclipse_won.27t_find_it.
Upvotes: 5
Reputation: 31
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.
Upvotes: 3
Reputation: 1
I had this problem for a while and just now got it to work.
Here's what I did:
In Eclipse, go to Window>Preferences>C/C++>Build>Environment. Double click the row that has PATH in the leftmost column to open the list. Make sure you've got \bin at the end of your C:\MinGW in that list. Mine didn't have the \bin. I changed it to read C:\MinGW\bin and now it works like a charm.
Hope this helps.
Upvotes: 0
Reputation: 182
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 :)
Upvotes: 1