Re: shared library name resolution

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 ❖

Attachment: signature.asc
Description: OpenPGP digital signature


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux