This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: How to create a .so from .c


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]