shared library name resolution

Ulrich Drepper drepper at redhat.com
Fri Jun 16 14:26:37 UTC 2006


Rex Dieter wrote:

> Avoid unresolved symbols in your shared library.  Instead of
> linking -lrt -lssl in your apps, add -lrt -lssl when creating the library,
> ie, instead of
> gcc -shared $(CPPFLAGS) -o $(TARGET) $(OBJ)
> do
> gcc -shared $(CPPFLAGS) -o $(TARGET) $(OBJ) -lrt -lssl


Or use

  gcc -shared $(CPPFLAGS) -o $(TARGET) $(OBJ) -Wl,--as-needed -lrt -lssl
-Wl,--no-as-needed


(one long line).

-- 
➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mountain View, CA ❖

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 251 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/fedora-list/attachments/20060616/7a1d0375/attachment-0001.sig>


More information about the fedora-list mailing list