Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"Program is not a recognized executable" error in Eclipse

Tags:

c++

eclipse

I'm trying to debug a C++ programme in Eclipse Indigo. The project is using autotools/configure (and the respective plugin) as build system.

After successful build I right-clicked on the binary in the project browser and chose "Debug As". Then I used the file browser to select the binary. Clicking on "Debug" then opens a dialog which just says "program is not a recognized executable".

Any ideas?

like image 261
Andreas Avatar asked Aug 09 '11 20:08

Andreas


2 Answers

I found the answer: the binary parsers configured in eclipse were the wrong ones. Adding the correct binary parser under Project --> Properties --> C/C++ Build --> Settings solves he problem.

like image 165
Andreas Avatar answered Nov 20 '22 08:11

Andreas


If you're using libtool in your project, what looks like the binary may actually be a wrapper script used to set LD_LIBRARY_PATH and stuff like that before executing the real binary (which is stored in the .libs directory). This may be what causes Eclipse to fail, but I'm not sure how you should go about fixing that.

There seem to be a bit of documentation about Eclipse CDT and libtool on the internet which may have the infos you need though: http://www.freerdp.com/wiki/doku.php?id=eclipse#debug_configuration

like image 3
Pierre Bourdon Avatar answered Nov 20 '22 06:11

Pierre Bourdon