This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Wrong elf class
- From: "Steven Quinones-Colon" <stevenq1967 at gmail dot com>
- To: gcc-help at gcc dot gnu dot org
- Date: Thu, 5 Apr 2007 14:40:52 -0700
- Subject: Wrong elf class
This is my system:
Main memory size: 3941 Mbytes
2 AuthenticAMD AMD Athlon(tm) 64 X2 Dual Core Processor 4600+ processors
MHz 2400.000
512 kB cache
1 vga+ graphics device
1 Quadro FX 540 graphics device
1 IDE device:
/dev/hdc: ATAPI 40X DVD-ROM drive, 254kB Cache, UDMA(33)
PCI bus devices:
20 generic devices
I'm trying to get started with gcc. I installed from source, I didn't
get any errors. I started by trying out this program from Programming
in Objective-C:
// First program example
#import <stdio.h>
int main (int argc, const char *argv[])
{
printf ("Programming is fun.\n");
return 0;
}
I compiled this way:
~/Applications/gcc/bin/gcc main.m -o prog1 -l objc
when I run prog1 I get :
./prog1: error while loading shared libraries: libobjc.so.1: wrong ELF
class: ELFCLASS32
My installation is as follows,
./gcc -v reports:
Using built-in specs.
Target: x86_64-unknown-linux-gnu
Configured with: /usr/people/stevenq/src/gcc-4.1.2/configure
--prefix=/usr/people/stevenq/Applications/gcc
Thread model: posix
gcc version 4.1.2
So it knows it's 64 bit,
My LD_LIBRARY_PATH has /usr/people/stevenq/Applications/gcc/lib in it.
Any reason why it's using a 32 bit library, did it somehow compiled with 32 bit?
Best regards,
Steven