Reputation: 13786
I have a shared objects file libfoo.so, which I believe is 32bits:
libfoo.so: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked, BuildID[sha1]=....
I'm developing on 64bits Linux, can I just link to the library, or do I have to use -m32
switch, in which case, all my code will be built into 32 bits.
Upvotes: 0
Views: 107
Reputation: 363882
All code has to be the same bitness for it to link. Get a 64-bit version of the library if you can, otherwise you're stuck with -m32
to make a crusty old 32-bit executable.
Upvotes: 2