You are not logged in.
Pages: 1
I have Fedoara 11 install on my PC. I want to compile program as 32 by g++ option -m32. I have 32 bit library install on my machine which present in path
/usr/lib/gcc/x86_64-linux-gnu/4.4.0/32
and 64 bit library is on path
/usr/lib/gcc/x86_64-linux-gnu/4.4.0
When i compile my sample program with -c & -m32 option it compile correctly
c++ -c -m32 Sample.cpp
but when i am trying to create executable by command
c++ Sample.o -m32 -o Sample
then it gives linking error as
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.4.0/libstdc++.so when searching for -lstdc++
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.4.0/libstdc++.a when searching for -lstdc++
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.4.0/libstdc++.so when searching for -lstdc++
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.4.0/libstdc++.a when searching for -lstdc++
/usr/bin/ld: cannot find -lstdc++
collect2: ld returned 1 exit status
Can anybody please tell me solution for this problem
Offline
i have Fedora 11 thats why i have install these rpm for 32 library
yum install glibc-2.10.1-2.i686.rpm
yum install glibc-devel-2.10.1-2.i586.rpm
I think so it has created library in path
/usr/lib/gcc/x86_64-linux-gnu/4.4.0/32
I have library in both path above one and /usr/lib/gcc/x86_64-linux-gnu/4.4.0/ so i have presume that this /usr/lib/gcc/x86_64-linux-gnu/4.4.0/32
path contain 32 bit library i have tried to link it but still it gives above error
Offline
I'm telling you, the error message is clearly stating you are missing a 32-bit version
of libstdc++... You said you installed 32-bit glibc... That's completely different (but,
probably also necessary)... If you were compiling a straight C program with gcc,
then you might only need glibc... But, you're compiling a C++ app with g++, so you
need libstdc++, which is a separate package... I'm running CentOS 5.3, not Fedora,
but for me the correct command would be the one I gave you: "yum install libstdc++.i386"...
(Note: your example yum commands don't even look right... Yum does the downloading
for you, so you shouldn't be giving it a downloaded RPM file name... Just a package
name, and optional architecture... If you do give it your own downloaded RPM file,
then you instead want "localinstall" not "install"...)
Offline
Do you have kernel sources/kernel headers installed?
I also got this error when I tried compiling the driver without having compiled my kernel. After doing that, and rebooting the driver compile worked fine.
Pages: 1