Linking static libs into shared libs
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
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 -static -lstatic -lanotherstatic

I hope someone can help me.

Thanks in advance,

More information about the Gcc-help mailing list