Sean
Sean

Reputation: 4525

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.

Upvotes: 1

Views: 763

Answers (1)

Greg
Greg

Reputation: 6186

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.

Upvotes: 1

Related Questions