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]
Other format: [Raw text]

Re: Trying to build a shared library on solaris using gcc


>
> 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
>

I think you need -shared here.


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