• using a 32-bit library on a 64-bit machine

    From Art Werschulz@1:0/0 to All on Wed Nov 4 02:27:44 2009
    Hi.

    We have a mixed bunch of 32-bit (i686) and 64-bit (x86_64) Fedora 11
    machines. I created a library on one of the 32-bit machines by issuing
    the commands
    g++ -c List.cc
    ar q libList.a List.o
    ranlib libList.a

    Suppose that I attempt to use same on a 64-bit machine:
    g++ -o foo foo.o -L. -lList
    I get the following:
    /usr/bin/ld: skipping incompatible libList.a when searching for -lList
    /usr/bin/ld: cannot find -lList

    Now it's my impression that the 64-bit machines can use 32-bit
    libraries, see (e.g.) /usr/lib vs. /usr/lib64. Other than the fact that
    these two directories are using shared libraries (.so), is there
    something I'm missing here that would allow the 32-bit libraries to be
    used on the 64-bit machines?

    Many thanks.

    --
    Art Werschulz (8-{)} "Metaphors be with you." -- bumper sticker
    GCS/M (GAT): d? -p+ c++ l++ u+ P++ e--- m* s n+ h f g+ w+ t+ r-
    Net: agw@dsm.fordham.edu http://www.dsm.fordham.edu/~agw
    Phone: Fordham U. (212) 636-6325, Columbia U. (646) 775-6035

    --- MBSE BBS v0.95.5 (GNU/Linux-x86_64)
    * Origin: The KofoBBS MBSE - telnet://fido1.kofobbs.net