问题
Using latest MinGW and C++ Eclipse.
If I create an "Executable Hello World" project, build it and run it, everything works as expected.
If I create an "Executable Empty Project", then create a main.cpp file, build and run, I get the error message "Launch failed. Binary not found."
How can I make empty project generate binary files? I looked everywhere in the project properties but I must have missed it.
回答1:
For me the solution was this:
select your project and goto "project"-menu/properties (on mac).
c/c++ Build/Settings.
Binary parsers. now tick the one that suits your system (elf for linux, mach 64 for mac, pe for windows etc). the default is always elf and it reverts to it after every project, at least for me.
回答2:
On Eclipse Kepler (c++) with standard settings I today discovered that the error parser that creates the output in the "Problem" tab failed
In the console there was an compile error from gcc, but it didn't show in the Problem tab, which is the one I look in the most. It was a type conversion error, very typical and nothing exotic, definitely something that should be included as an error.
Hope it helps someone.
来源:https://stackoverflow.com/questions/12936792/make-eclipse-generate-c-executable-file