Eclipse CDT C++ error
I use window Eclipse CDT gdb to debug a C++ program. When I wrote may own makefile as follows
all: prog1
prog1: prog1.cpp
g++ -o prog1 prog1.cpp
It compiled and 开发者_运维技巧run successfully. But if I click the debug button, it says no available source main....
.
Edit
If I copy the same program to a new C++ project in Eclipse with its internal makefile
(instead of writing my own makefile), I can use debug mode. But eventually, I have the following errors.
No source available for "__mingw_CRTStartup
How should I do?
Thanks.
Try to change your line
g++ -o porg1 prog1.cpp
to
g++ -o prog1 prog1.cpp
Probably the name of the output (i.e., the program) is wrong, and therefore Eclipse can't launch it.
精彩评论