This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Trying to build a shared library on solaris using gcc
- From: "Prasanna Katta" <Prasanna dot Katta at theice dot com>
- To: <gcc-help at gcc dot gnu dot org>
- Date: Mon, 28 Apr 2003 13:02:46 -0400
- Subject: Trying to build a shared library on solaris using gcc
Hello,
I am trying to build a shared library "mine.so". This shared library uses code in another shared library "abc.so". However when a process tries to load "mine.so", it is not able to do so. The following are my compile and link command lines:
Could somebody tell me what I am doing wrong?
Thanks.
COMPILATION:
gcc -c -fPIC -DUNIX -DSOLARIS_GCC -I./include mine.c
LINK:
ld -G -z text -B symbolic -o mine.so -fPIC -h mine.so mine.o ./include/gciualib.o /usr/lib/abc.so -L/usr/local/lib -ldl -lm -lsocket -lnsl -lc -lrt -lpthread