Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Eclipse C++ error "Launch failed. Binary not found." HELP!(Eclipse C++ error "Launch failed. Binary not found." HELP!)
Eclipse C++ error "Launch failed. Binary not found." HELP! [message #1385924] Thu, 12 June 2014 09:47 Go to next message
Lukas Rimavičius is currently offline Lukas RimavičiusFriend
Messages: 1
Registered: June 2014
Junior Member
Hello,

I got an error in Eclipse C++ error "Launch failed. Binary not found.". I built a project and run it. When i run it it shows an error. Please help who know how to fix this problem! Help! Thanks!
Re: Eclipse C++ error "Launch failed. Binary not found." HELP! [message #1401661 is a reply to message #1385924] Wed, 16 July 2014 00:10 Go to previous messageGo to next message
kessel haus is currently offline kessel hausFriend
Messages: 302
Registered: July 2009
Senior Member
Am 12.06.2014 15:41, schrieb Lukas Rimavičius:
> Hello,
>
> I got an error in Eclipse C++ error "Launch failed. Binary not found.".
> I built a project and run it. When i run it it shows an error. Please
> help who know how to fix this problem! Help! Thanks!

Did it really build, or did it show compile / linking errors?
Re: Eclipse C++ error "Launch failed. Binary not found." HELP! [message #1402131 is a reply to message #1401661] Wed, 16 July 2014 15:16 Go to previous messageGo to next message
Doug Schaefer is currently offline Doug SchaeferFriend
Messages: 72
Registered: July 2009
Member
Is the binary you are trying to launch actually there. If so, you're binary parsers setting in the project properties might be set to the wrong thing. A little more information about what toolchain you are using would help.
Re: Eclipse C++ error "Launch failed. Binary not found." HELP! [message #1402811 is a reply to message #1385924] Thu, 17 July 2014 14:42 Go to previous messageGo to next message
William A is currently offline William AFriend
Messages: 2
Registered: July 2014
Junior Member
I also have this problem.
My setup is:
-Debian 7 (Wheezy)
-Eclipse with CDT (C++) - installed with apt-get
-libsdl2-dev - installed with apt-get

I only get this error while trying to use a custom library (SDL.h from the libsdl2-dev package).
The library is in /usr/include/SDL2
I have added these links to the Properties->C++ Build->Settings
under both the C++ Compiler->Includes and C++ Linker->Libraries:
Folder: /usr/include/SDL2
File: /usr/include/SDL2/SDL.h

I see in the console that the C++ Linker command issued on "Build" is:
g++  -o "Project_Name"  ./src/main.o   -l/usr/include/SDL2/SDL.h

(This is without the library folder in the C++ Linker, which alone does nothing, but I tried with the folder and without the folder.)

And the error following is:
/usr/bin/ld: cannot find -l/usr/include/SDL2/SDL.h
collect2: error: ld returned 1 exit status


I thought this may be because the "-l" is coming after the file name, but got the same error when manually trying this command while putting the main.o file at the end of the command; indeed, "ld" can not find the file. I did an "updatedb", but that did not fix the issue.

If I take out the C++ Linker libraries, then the C++ Compiler runs fine (using the includes), but when the C++ Linker is invoked I get an error about all of the SDL functions not being found, such as
undefined reference to `SDL_Init'
Re: Eclipse C++ error "Launch failed. Binary not found." HELP! [message #1402852 is a reply to message #1402811] Thu, 17 July 2014 20:23 Go to previous message
William A is currently offline William AFriend
Messages: 2
Registered: July 2014
Junior Member
Okay, posting my thoughts usually helps me, and did so in this case.
For this I will use "SDL2" as an example.

If you want to include a downloaded library then you need to set the following in Project->Properties->C++ Build->Settings:

C++ Compiler->Includes:
-Include Paths (-l): /usr/include/SDL2
-Include Files (-include): SDL.h

C++ Linker->Libaries:
-Libraries (-l): SDL2
-Library Search Path (-L): /usr/lib/i386-linux-gnu
(The full path and filename in my system is: /usr/lib/i386-linux-gnu/libSDL2.so
There is also one at: /usr/local/lib/libSDL2.so
But you do not include the prefix "lib" or the extension ".so")

Note that your search path may be different; you can use the "locate" command to find the path of files.

Hopefully this helps people who have the same error, due to being new at compiling and not knowing the correct syntax of commands called by Eclipse.

[Updated on: Thu, 17 July 2014 20:28]

Report message to a moderator

Previous Topic:Codeanalysis in cxWidgets Project
Next Topic:C Editor, Strg+Shift+/ -> Change // to /**/
Goto Forum:
  


Current Time: Wed Nov 26 18:04:03 GMT 2014

Powered by FUDForum. Page generated in 0.02145 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software