0

I have just recently started running Linux on my PC and I am trying to start learning OpenGL. I am using the latest version of Eclipse CDT as my IDE, and my system is Ubuntu 10.10, 64 bit version.

The problem I am having is that whenever I try to run a build from within the IDE I get the error message "Launch Failed. Binary Not Found."

Ive done a lot of looking around on the internet but I still cant solve the problem. I know for a fact that the binary is built, it can be run from a terminal window. According to posts I have seen the problem is that Eclipse tries to run a 32 bit binary, but GCC 4.4.5 defaults to 64 bit binaries on a 64 bit system. * Edit * This is where I gathered the above information

Ive seen a lot of information about using the -m32 flag in makefiles, but then I still get the following output in Eclipse:

make all 
g++ -o HelloWorld2 main.o 
/usr/bin/ld: i386 architecture of input file `main.o' is incompatible with i386:x86-64 output
/usr/bin/ld: final link failed: Invalid operation
collect2: ld returned 1 exit status
make: *** [HelloWorld2] Error 1

What I would like to know is how to either get Eclipse to launch the 64 bit binaries, or have Eclipse correctly compile 32 bit binaries.

Community
  • 1
  • 1
waffleShirt
  • 385
  • 1
  • 3
  • 11

1 Answers1

0

(I was able to reproduce the error you describe, so my answer is based on 'reverse-engineering' the error).

In the eclipse projects pane, right-click the project and go to 'properties'. Under C/C++ Build -> Settings, click the Binary Parsers tab, and verify that Elf Parser is checked. (I am not sure if it needs to be the only checked parser).

Btw, you can verify the class of your binary file using readelf -h myBinary.o and looking at the Class field.

Regarding running the 32-bit binary, maybe this post is helpfull: http://stefaanlippens.net/32bit_executable_on_64bit_machine

Itamar Katz
  • 9,544
  • 5
  • 42
  • 74
  • Thanks so much, I can now launch and debug the applications and I just have to select some simple options and it all works fine. I still have to look into compiling 32 bit binaries but for now I have enough to start coding. – waffleShirt Jan 17 '11 at 06:11