How to create a .so from .c

Curtis R Anderson gleepy@intelligencia.com
Wed Jun 20 21:48:00 GMT 2001


Narasiman Balasubramanian wrote:
> 
> Hi,
>    How to create a .so file from .c , I am using gcc
> 2.95.3 on IBM aix 4.3 machine.

Compile all C files with your usual options plus -fPIC. This produces
position-independent code needed by shared object files.

Link the resulting .o files with a command like
   gcc *.o -shared -o file.so [-l<libraries>]
-- 
Curtis R. Anderson, Co-creator of "Gleepy the Hen", SP 2.5?, KoX
Vacuum a cat today! (The rest of this space is reserved.)
http://www.madbbs.com/~gleepy/         ICQ: 50137888
mailto:gleepy@intelligencia.com        UTM: PS 7036 7315, zone 17



More information about the Gcc-help mailing list