[Gc] Linking against libdl

Mike Hearn mike at navi.cx
Fri Jan 21 10:51:48 PST 2005


Hi,

At the top of gc_dlopen.c is this comment:

/*
 * This used to be in dyn_load.c.  It was extracted into a separate file
 * to avoid having to link against libdl.{a,so} if the client doesn't call
 * dlopen.  Of course this fails if the collector is in a dynamic
 * library. -HB
 */

Why is linking against libdl bad? Is there any way to make this work
when GC is a dynamic library? Right now if you want to use libgc you
have to specify -ldl yourself, which is bad for various reasons (bogus
dependencies break apps, mix implementation details into clients etc).

thanks -mike



More information about the Gc mailing list