how to create shared library under solaris
Martin Kahlert
martin.kahlert@keksy.mchp.siemens.de
Tue Oct 26 00:48:00 GMT 1999
[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.
More information about the Gcc-help
mailing list