Linking static libs into shared libs

Alexander.Schmid@RSD.rohde-schwarz.com Alexander.Schmid@RSD.rohde-schwarz.com
Wed Dec 18 02:07:00 GMT 2002


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







More information about the Gcc-help mailing list