This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: Create an so file
- From: Eric Botcazou <ebotcazou at libertysurf dot fr>
- To: Seifeddine BEN JALLEL <seifeddine dot jallel at st dot com>
- Cc: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 25 Nov 2004 11:53:39 +0100
- Subject: Re: Create an so file
- References: <001a01c4d2cf$a24e4c00$723e82a4@tun.st.com>
> I'm working on SOLARIS machine, and i have a problem. So on trying to
> create the .so file with gcc command line, a fatal error was shown on the
> screen.
>
> Command lines :
> > gcc -c -I"/sw/java/j2sdk/v1.4.2/j2sdk1.4.2/include/"
> > -I"/sw/java/j2sdk/v1.4.2/j2sdk1.4.2/include/solaris" -o GenExt2FS.o
> > GenExt2FS.c gcc -o GenExt2FS.so -shared GenExt2FS.o -lgcc
>
> The attached file contain the output of the second command.
Compile your source file with -fPIC. And you probably don't need -lgcc.
--
Eric Botcazou