Eclipse CDT project built but “Launch Failed. Binary Not Found”

后端 未结 16 2242
臣服心动
臣服心动 2020-12-13 07:14

Windows 7, Eclipse CDT, Juno Service Release 2, Cross compiler.

Projects do compile executables generated, but Eclipse can\'t see them; therefore \'Run\' fails. Exec

相关标签:
16条回答
  • 2020-12-13 07:33

    I've got the same problem on Eclipse 3.8.1. For me it worked to set the artifact type to executable:

    Right click on the project -> C/C++ Build -> Settings -> Build Artifact -> Artifact Type: Executable

    Finally rebuilding the project produced the Binaries entry in the Project Explorer.

    0 讨论(0)
  • 2020-12-13 07:36

    After trying everything here what worked for me was to grant execution permission to eclipse:

    cd eclipse-installation-dir 
    sudo chmod +x eclipse
    

    Using Eclipse Luna on Ubuntu 12.04 LTS.

    0 讨论(0)
  • 2020-12-13 07:39

    in my case this is the solution to fix it. When you create a project select MinGW GCC from the Toolchains panel.

    Once the project is created, select project file, press ctrl + b to build the project. Then hit run and the the output should be printed on the console.

    0 讨论(0)
  • 2020-12-13 07:41

    For what it's worth, I had this problem - and the cause was invalid DWARF 3 info in the binary in the selected project (which didn't have any runnable binaries).

    The way it work was something like this: I had two projects Main and Library. Main depended on the Library project and the former had an executable, while the latter just produced a static library (that Main linked against).

    My run option was set to "Run/Debug -> Launch" setting was set to "launch current, otherwise last" as follows (see bottom right):

    If I had the Main project selected, everything would work fine: it would launch the main project. If I had the Library project selected1 it would fail with the error message given by the OP. The reason seemed to be this: since I had the Library project selected, the PE scanner would scan the binary files in the project to see if any were launchable, and because scanning was failing due to this bug the error message popped up before it ever got to "Launch the previously launched application".

    I could work around it by:

    1. Making sure the project I wanted to launch was selected, or ...
    2. Changing compilers to one that made DWARF info that Eclipse could parse without failure, or ...
    3. Selecting "Always launch the previously launched application" in the Run/Debug settings - although it might not be your preferred mode of operation.

    1 I wouldn't usually select the project directly, of course, it would be indirectly selected because I was working in one of the source files it contained.

    0 讨论(0)
提交回复
热议问题