Question

I am new to using Eclipse and CDT and have been trying to get my C code to compile. When I Run As Local C Application, it returns an error message Launch Failed. Binary Not Found. I have MinGW-w64 in C:\mingw-w64. The program compiles and runs fine using gcc via cmd.

I would appreciate if eclipse-proficient users can help out with a how-to. Thanks!

Was it helpful?

Solution

Sometimes, if you try to launch first (before binary has been compiled) eclipse creates launch configuration automatically, that has no binary associated. Later even if you compiled your project (you do this using project/build or hammer icon), it will not associate binary automatically, as it tries to launch your old launch configuration. So:

  • make sure one of projects source files are selected (in editor for example)
  • click a down arrow next to bug icon
  • select debug configurations
  • select C/C++ application and click on "new launch configuration icon"
  • If C/C++ application field of your new launch configuration is empty, select search project or browse and tell it where your binary is
  • optionally set other launch/debug options
  • launch your new launch configuration using "Debug" button or from "bug" menu
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top