Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Linux by (9.5k points)
edited by

Below is the error I get when I  run a build from eclipse with the latest version of IDE on my Ubuntu 10.10, 64-bit version.

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

Can anyone tell me how to get Eclipse to launch the 64-bit version or how to make Eclipse compile 32-bit binaries? 

1 Answer

0 votes
by (19.7k points)
edited by

You can try to follow these steps:

  1. Right-click on the project

  2. Go to properties 

  3. Find C/C++ Build

  4. Settings ---> Binary Parsers tab 

  5. Verify if Elf Parser is checked. 

If you want to verify the class of your binary file, run the command below:

readelf -h myBinary.o

You can refer to this website to run 32-bit binary here 

Interested in Linux? Check out this Linux Certification by Intellipaat.

Related questions

0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
asked Mar 14, 2021 in Linux by sheela_singh (9.5k points)

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...