Trouble making Eclipse CDT work.

Hello, all. So, I'm a novice programmer who recently took to running eclipse for c++ coding on my Unix machine (Ubuntu). I can't seem to get past two errors:

1) 'Launch failed. Binary not found'.

2) 'The program file specified in the launch configuration does not exist'.

I haven't found a satisfactory solution for the first, and I have found nothing at all for the second. Does anyone know the solutions for these problems? Or perhaps just what these error messages entail? I don't know too much.

Thanks!
How did you install Eclipse CDT?
apt-get install eclipse-cdt, 64-bit
Yeah, that should be fine. It sounds as if your project simply wasn't built correctly (e.g. due to compile errors).
What do you mean? Any project for which this is a problem (basically anything beyond helloworld.cpp) builds and runs fine in other IDEs. Argh!
Last edited on
Do you have any idea what possible configuration hiccups could explain these errors?
Well, what are the error messages you get when you build the project (if any)?
(Build All/Ctrl+B or the hammer symbol)
Below is just one example:

This code has worked before (in codeblocks and with g++ from command line), but I have also gotten these errors before:

Invoking: Cross G++ Compiler
g++ -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"conditionals.d" -MT"conditionals.d" -o "conditionals.o" "../conditionals.cpp"
../conditionals.cpp: In function ‘void conditionals()’:
../conditionals.cpp:9:2: error: ‘cout’ was not declared in this scope
../conditionals.cpp:10:3: error: ‘cin’ was not declared in this scope
make: *** [conditionals.o] Error 1

**** Build Finished ****

--------------------------------------------------------------------------------------------------------------------------------------

separately compiled CODE. This code gives me error #2 ('The program file specified in the launch configuration does not exist'). I wrote it to test this problem.

headers.h -
void threeNplusOne();


threeNplusOne.cpp -
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#include <iostream>                     // iostream inclusion doesn't seem to matter. 

void threeNplusOne()
{
    int seed;

    std::cout << "what seed? ";
    std::cin >> seed;

    do {
        (seed % 2 == 0) ? (seed = seed >> 1) : (seed = 3*seed + 1);
        std::cout << seed << std::endl;
    } while(seed != 1);

    return;
}


testing.cpp -
1
2
3
4
5
6
7
8
9
10
11
12
#include <iostream>

#include "headers.h"

using namespace std;

int main()
{
    threeNplusOne();

    return 0;
}
Last edited on
You didn't include <iostream> in threeNplusOne.cpp, so it isn't surprising that it doesn't compile.
It doesn't matter. It originally did (I changed it just because I wanted to see how the errors changed), and does now (I changed it back for ya!). Same errors.
You have errors in "conditionals.cpp", but you posted no such file.
Please provide complete information about your code, what you were doing and what happened as a result.

This code gives me error #2 ('The program file specified in the launch configuration does not exist'). I wrote it to test this problem.

I find that hard to believe. Merely building the project will never attempt to launch it.
The error was had when launched, of course. And uh, this is embarrassing... for some reason there is a stray file from another project in this file, explaining these errors. Actually, it's the originally named 3n+1, but unremoved. I'm going to have to get back to you on this. Thanks a lot for you help.
Last edited on
Also, what is the deal with the binaries? How do I get eclipse to make them for me?
You get them by building the project. They will be placed in your project's folder.
Topic archived. No new replies allowed.