This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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






Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]