On 64 bit host I am trying to build shared libraries with -m32
option. Is it possible for these libraries to be linked with regular 64 bit libraries?
I am doing something like this:
g++ -m32 -shared source.cpp -l 64_bit_library.so -o 32_bit_library.so
and getting error messages like this:
/usr/bin/ld: skipping incompatible 64_bit_library.so
So my question is: how 64_bit_library.so
and 32_bit_library.so
should be compiled on 64 bit host, to make it possible for 32_bit_library.so
to be linked against 64_bit_library.so
?