This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: How to create a .so from .c
- To: Narasiman Balasubramanian <gccbala at yahoo dot com>, gcc-help at gcc dot gnu dot org
- Subject: Re: How to create a .so from .c
- From: Curtis R Anderson <gleepy at intelligencia dot com>
- Date: Thu, 21 Jun 2001 00:25:16 -0400
- Organization: Gleepy's Chaotic Henhouse
- References: <20010620093859.53827.qmail@web14706.mail.yahoo.com>
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