Re: GCC 6.2 and shared libraries: dlopen not found

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

 



On 16/11/16 15:35, Richard Sewards wrote:
> With gcc 6, it appears I must add "-ldl" when creating libtcl.so
> in order for a subsequent link that uses "-ltcl -ldl" will find
> dlopen.  Without -ldl when creating libtcl.so the subsequent link
> fails to find dlopen even though it's invoked with -ldl.    With
> gcc 5 this is not necessary.

This isn't really a GCC thing, it's more to do with the way that
the linker interworks with the shared library loader and the
--as-needed flag.  Use -ldl always and you'll be fine.

Andrew.




[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux