This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Linking static libs into shared libs
- From: Alexander dot Schmid at RSD dot rohde-schwarz dot com
- To: gcc-help at gcc dot gnu dot org
- Date: Wed, 18 Dec 2002 10:09:52 +0100
- Subject: Linking static libs into shared libs
Hi everybody,
I´m trying to create a shared lib, that needs some static libs to be created.
But when I try to link the shared lib against an executable, I get unresolved
externals.
Can anybody tell me what I did wrong? Is the "tunneling" of functions of a
static lib through the shared lib not possible?
Here´s the situation (well, lets say what I did) in Detail:
- creating the static lib: g++ -c libstatic.cpp
ar rcs libstatic.a libstatic.o
-creating the shared lib: g++ -c -fPIC libshared.cpp
g++ -shared -o libShared.so -static -lstatic -lanotherstatic
I hope someone can help me.
Thanks in advance,
Alex