shared library name resolution
Mike - EMAIL IGNORED
m_d_berger_1900 at yahoo.com
Fri Jun 16 12:41:02 UTC 2006
On Fedora Core 4, I have some C++ code developed
that I keep in a library. Until recently, I used
ar to generate a libXXX.a . Now I have changed to:
TARGET = libXXX.so
CPPFLAGS = -fPIC -DPIC -O3 -I.
$(TARGET): $(OBJ)
gcc -shared $(CPPFLAGS) -o $(TARGET) $(OBJ)
to create libXXX.so , and I noticed that some
executables dropped in size by about a factor
of 10. Good.
Now some of the code in my library depends on
the realtime and openssl libraries so when
utilizing these, I have always used:
-l rt -l ssl
in my link lines. But for code that did not depend
on these capabilities, the corresponding -l were
not required.
Now, on the contrary, find that these -l designations
are required WHETHER OR NOT these capabilities are
needed in the application. Otherwise I get unresolved
names.
Is this to be expected with shared libraries? Is
there something I could do to my shared library to
prevent it?
Thanks for your help.
Mike.
More information about the fedora-list
mailing list