I have install the C/C++ CDT Version of Eclipse. After making a HelloWorld.c file and get the code in there I get an error of “Launch failed. Binary not found”.
I found in google that my Eclipse miss the compiler and I install MinGW on my computer and add the path to env variables (tested it with “gcc -v” in cmd and succeded).
1) I can build now, but have no idea how to make a MAKEFILE. – I Read 10 tutorials but don’t understand it – ideas?
2) I can build, but not run, I get “Launch failed. Binary not found” – ideas?
Found the error: I never maked a “.c” file -.- after renaming it – works fine.
Revised answer: If you want to avoid writing a real makefile, you can write something like this:
You need to specify the binary which gcc outputs (
gcc [..] -o <this one>) in the run settings (in the previous example, it should point torunme.exe). Go toRun->Run Configurations, and underC/C++ Applicationbrowse and look forrunme.exe.I would, however, strongly advise you to seriously learn about makefile. The beauty of makefiles is that you can use very little features at first and use more and more as you go on (as you saw, writing a “dummy” file was very quick). At first I suggest you write something a bit more “clever” than what I gave you above. Here’s a nice tutorial and an example:
all is what compiles at default. What comes before the
:are rule names and after it are the dependencies. i.e, to compileallyou need to compilehello(though only if it’s been updated), and so forth. the line below the rule is the command to compile. I hope this helps. Please read the tutorial, Makefiles are important.