Saturday, January 16, 2010

C/C++ on Windows 7 using Eclipse

If you got a "Launch Failed. Binary Not Found" error while running C/C++ project in Eclipse on a Windows 7 machine then you are not the only one. I came across similar problem and I have tried my best to give a terse solution. The reason for this issue might be because  Eclipse doesn't understand the 64 bit binaries generated by our Windows 7 Though,  I'm not sure. Okay, back to our problem. 


The quick steps that are to be followed to run a C/C++ program on Windows 7 are: 

1. We need compiler for Windows for this we are going to install  the following:


Open exe->Choose download and install-> install Current package->Check MinGW tools, g++ compiler, MinGW make-->install path C:\MinGW->Finish. 


(b) Minsys 


Open downloaded exe-> folder C:\msys\1.0-->For MinGW path give C:\MinGW-> Finish.


2. We set the Path (Environment variables) for these compilers: 
Append following to your Path variables (*can be located in the Advanced tab of System in the control panel under the Environment Variables option - Google it if you still can't locate it)


;C:\msys\1.0\bin;C:\mingw\bin


3. Installing CDT plugin to your existing Eclipse: 


Software Update link is: http://download.eclipse.org/tools/cdt/releases/galileo


4. Create a new  project and run the Helloworld file. 


Done ! 


Post any queries you might have. 
Enjoy!!! 













6 comments:

senthilkumar said...

I had the same problem., thanks fr u., followed ur steps nd resolved now..

Unknown said...

what did you mean with this line?
Open downloaded exe-> folder C:\msys\1.0-->For MinGW path give C:\MinGW-> Finish.


i opened the exe but what do you mean with give this path for mingw??
thanks

nani said...

thanks, it works...

Pranay Dharmale said...

@amor_pasado13 -
That path refers to the path of MinGW which is to be provided while installing MinSys.

Randeep said...

Why download MinGW and msys separately? The current installer bundles them both together (mingw-get).

Unknown said...

thank you so much! it worked well! now i can finally compile helloworld!