“Program is not a recognized executable” error in

2019-09-04 09:13发布

I know that this question has been posted before but I'm still not able to make it work, obviously I'm new to C++ ;) I have this "hello world!" C++ program in eclipse using CDT, and I'm able to compile it and it works if I run it from a console .... but when I use the run or debug commands inside eclipse ,I'm getting two different errors:

From debug: "Program is not a recognized executable"

From run : "Exec_tty error:Cannot run program "/blah/blah/CProjects/Practice/MAIN.cpp": Unknown reason"

I tried by modifying the parser on the project , but no luck ...I'm actually using GNU Elf parser , and I used gdb from the command line and runs normally so obviously (to me at least ) is something wrong in my eclipse configuration ...but what??

Thanks a lot

D

1条回答
倾城 Initia
2楼-- · 2019-09-04 09:47

You cannot run the C++ source code. You have to run the executable.

In the Eclipse environment, a simple "debug" command should do the right thing. You must have confused it by configuring the source code as the debugger target.

查看更多
登录 后发表回答