linking with 32-bit libraries on 64-bit systems

Mohammed El-Afifi mohammed_elafifi at yahoo.com
Wed Jun 27 11:44:52 UTC 2007


I'm using fedora 6, the 64-bit edition. I'm trying to build a program that links with a 32-bit library. I'm using a command similar to the following:
g++ -o main /usr/lib/libvorbisfile.so main.cpp
I'm getting an error that tells me that symbols can't read from the library file because it has a wrong format.
However, when I try to build the program with the 64-bit version of the library using a command like the following:
g++ -o main /usr/lib64/libvorbisfile.so main.cpp
the program is built successfully.
I tried to build this same program on a system running fedora 6, the 32-bit edition, using the same command:
g++ -o main /usr/lib/libvorbisfile.so main.cpp
and it was built successfully.
It seems that the gcc on fedora 64-bit refuses to link programs with 32-bit libraries. Is there a method to force the gcc to link programs to 32-bit libraries on a system running the 64-bit edition of fedora 6?
Appreciating your feedback.


      ___________________________________________________________________________________
You snooze, you lose. Get messages ASAP with AutoCheck
in the all-new Yahoo! Mail Beta.
http://advision.webevents.yahoo.com/mailbeta/newmail_html.html
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/fedora-list/attachments/20070627/7d78bd49/attachment-0001.htm>


More information about the fedora-list mailing list