32/64 bit problems with Eclipse CDT on Ubuntu

Posted by waffleShirt on Stack Overflow See other posts from Stack Overflow or by waffleShirt
Published on 2011-01-15T07:51:17Z Indexed on 2011/01/15 7:53 UTC
Read the original article Hit count: 268

Filed under:
|
|
|

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.

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.

© Stack Overflow or respective owner

Related posts about linux

Related posts about 64bit