Wednesday, June 23, 2010

How to compile a 32bit dynamic library on a 64bit linux

You can use -m32 or -m64 flag to tell the gcc compiler to compile in 32 or 64 bit.

Now, the trick is that configure and make will accept this flags, if you insert them in the CC variable like this:

./configure CC="gcc -m32"

or when with make

make CC="gcc -m32"

Hope this saves you some frustration i had gone through trying to compile it by hand.

No comments:

Post a Comment