Re: linking with 32-bit libraries on 64-bit systems

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 6/27/07, Fernando Apesteguía <fernando.apesteguia@xxxxxxxxx> wrote:
On 6/27/07, Mohammed El-Afifi <mohammed_elafifi@xxxxxxxxx> wrote:
>
>
> 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?

I don't remember it exactly, but I think you have to use -m32 to tell
gcc that you are going to create a 32-bit executable.

Cheers

OK, Hi again

Try with this to link. I don't know why, but in a single step gcc
seemed to not bypass the good options to ld.

gcc -o program -m32 -march=i386 -L/usr/lib -L/lib my.o


HTH


> Appreciating your feedback.
> ________________________________
> Boardwalk for $500? In 2007? Ha!
> Play Monopoly Here and Now (it's updated for today's economy) at Yahoo!
> Games.
> --
> fedora-list mailing list
> fedora-list@xxxxxxxxxx
> To unsubscribe:
> https://www.redhat.com/mailman/listinfo/fedora-list
>


--
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux