Trouble making Eclipse CDT work.

Nov 2, 2012 at 2:54am
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!
Nov 3, 2012 at 2:42pm
How did you install Eclipse CDT?
Nov 3, 2012 at 9:27pm
apt-get install eclipse-cdt, 64-bit
Nov 3, 2012 at 10:14pm
Yeah, that should be fine. It sounds as if your project simply wasn't built correctly (e.g. due to compile errors).
Nov 3, 2012 at 11:03pm
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 Nov 3, 2012 at 11:06pm
Nov 3, 2012 at 11:09pm
Do you have any idea what possible configuration hiccups could explain these errors?
Nov 4, 2012 at 2:25am
Well, what are the error messages you get when you build the project (if any)?
(Build All/Ctrl+B or the hammer symbol)
Nov 4, 2012 at 2:46am
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 Nov 4, 2012 at 5:16pm
Nov 4, 2012 at 12:19pm
You didn't include <iostream> in threeNplusOne.cpp, so it isn't surprising that it doesn't compile.
Nov 4, 2012 at 4:50pm
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.
Nov 4, 2012 at 5:18pm
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.
Nov 4, 2012 at 5:27pm
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 Nov 4, 2012 at 5:27pm
Nov 4, 2012 at 5:39pm
Also, what is the deal with the binaries? How do I get eclipse to make them for me?
Nov 4, 2012 at 6:10pm
You get them by building the project. They will be placed in your project's folder.
Topic archived. No new replies allowed.