>On Thu, Jul 16, 1998 at 12:29:09PM +0530, Somnath Roy wrote:
>> Is there any guideline for writing DLLs in Linux ?
>
>What you want to use are shared libraries in Un*x/Linux land, probably,
>like /lib/libc.so ... (so = shared object)
>
>gcc -fPIC -O2 -c file1.c
>gcc -fPIC -O2 -c file2.c
>...
>gcc -shared -Wl,-soname,libXY.so.1 -o libXY.so.1.0 file1.o file2.o ...
>ln -s libXY.so.1.0 libXY.so.1
>ln -s libXY.so.1 libXY.so
>
>Linking to library:
>gcc -o executable -L/path/to/lib -lXY exec1.o exec2.o ...
Is -fPIC neccesary ?
Do lib*.so files have no reloc tables ?
I compiled once a shared library without -fPIC and it didn't give me no troubles.
And another question :
How to make a shared library to contain a statical library ?
Like : gcc superlib1.o superlib2.o -lmytools -shared -o libsuper.so
I want the libmytools.a code to be part of libsuper.so ( that is : statically linked to it )
egcs 1.03 defaults to dynamic link , even if only the static ( libmytools.a ) version is avaliable.
-- David Balazic , student E-mail : 1stein@writeme.com | living in sLOVEnija home page: http://surf.to/stein Computer: Amiga 1200 + Quantum LPS-340AT--- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html