This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: how to create shared library under solaris
- To: help-gcc at gnu dot org
- Subject: Re: how to create shared library under solaris
- From: martin dot kahlert at keksy dot mchp dot siemens dot de (Martin Kahlert)
- Date: 26 Oct 1999 07:20:06 GMT
- Newsgroups: gnu.g++.help,gnu.gcc.help
- Organization: Siemens Inc.
- References: <Uv_Q3.2727$0k2.36987@stones>
- Reply-To: martin dot kahlert at mchp dot siemens dot de
- Xref: wodc7nx0 gnu.g++.help:902 gnu.gcc.help:1585
[Posted and mailed]
In article <Uv_Q3.2727$0k2.36987@stones>,
"Roger Woodward" <rogerw@autogrouper.co.uk> writes:
> can anyone point me to some good documentation on and/or
> outline the salient
> points of creating a shared library using GNU C++.
>
> the man pages do not go beyond listing -fpic and -shared
> as compile and link
> options and i would like to understand whats required.
gcc -fPIC -c source.c
gcc -o library.so -shared source.o
Should work. You can give the shared lib an
soname by using
gcc -o library.so -Wl,-h,library.so -shared source.o
Hope this helps,
Martin.
--
The early bird gets the worm. If you want something else for
breakfast, get up later.