Search code examples
ceclipsegcccygwin

Eclipse will not run C programs


I just recently installed the CDT plugin for Eclipse in Windows 8 and I'm getting the error:

"Launch failed. Binary not found."

Now I've looked into this and I have installed cygwin with gcc and set that up in Eclipse settings. I went to Window>Preferences>New C/C++ Project Wizard>Makefile Project and checked Cygwin PE Parser (and just in case I checked PE Windows Parser as well).

Then I went to Window>Preferences>Build>Environment and added my PATH variable there. I made sure to add C:\cygwin64\bin to my PATH in my system settings, and I know this is valid because I checked that location and I have successfully run gcc through the command line as well as the cygwin terminal. On top of this, if I build my project in Eclipse and then navigate to that directory outside of Eclipse and run the .exe that it creates by double-clicking on it, it also runs properly.

I'm at a loss for why Eclipse can't run it but everything else can...Any suggestions?


Solution

  • right click your project in eclipse "project explore" -> Run as -> Run configuration =>select your project name then check "Main" tab, in C/C++ application file. is it point to your binary file? E.g: Debug/TestProj.exe