I am trying to install a C++ compiler on Eclipse without altering the Path variables as I can't, the machine has limited rights. Eclipse obviously runs fine, it's the build that doesn't, it complains about.
The first thing I noticed was a warning that said "Unresolved inclusion" for the libary file stdio.h
I added the path variable inside Eclipse's "Windows > Preferences > C/C++ > Environment" with a new environment variable named "Path" with a path to my minGW/bin folder but to no avail. I also tried setting it to "Replace the native environment variable with specified one" but also no change.
The build errors out saying:
**** WARNING: The "Default" Configuration may not build ****
**** because it uses the "MinGW GCC" ****
**** tool-chain that is unsupported on this system. ****
and then
(Cannot run program "make": Launching failed)
And of course no more. It's a simple Hello World test, so the code shouldn't be an issue. I can see the includes under a folder in the "Includes" area that Eclipse generates (D:\MinGW\binutils\lib) but clicking on them in the Outline tab of Eclipse brings up the error "No include files were found that matched that name".
It looks like you're trying to build a simple hello world program using Eclipse/CDT and a development environment and using mingw as the compiler tool chain. I was able to get this working just now without modifying my system path environment variable. This is what I did:
Contents of my main.c file
Contents of my makefile:
After doing this, my project built successfully and produced a HelloWorld.exe exectuable in my project.
Another option that doesn't require adding a PATH variable to the system or project properties, or adding the include path to the project properties is to simply gives full path info to the commands in the makefile. For small projects this is manageable. Here's an example makefile:
Contents of makefile:
Of course you'll also have to change the build command from simply "mingw32-make" to "C:\mingw\bin\mingw32-make" as well.
Another downside of this approach is that the CDT code parser will not be able to locate include files so you'll have warning in the editor to that effect.