Click to See Complete Forum and Search --> : .so coding


stavefan
05-04-2001, 05:10 PM
Hi all,

I am curious as to how to build .so files using C++. Can anyone point me in the direction of a tutorial and/or book?

Thanks
stavefan

pinoy
05-04-2001, 06:20 PM
If using gcc, generate your object files with -fpic.

gcc -fpic -c testfile.c
gcc -fpic -c testfile2.c

Then link your object files into a shared library with -shared

gcc -shared testfile.o testfile2.o -o libtestfile.so

stavefan
05-07-2001, 08:35 AM
cool!

thanks for the help!

stavefan