cannot find -ldl
Dan Nelson
dnelson at allantgroup.com
Thu Jan 26 12:12:50 PST 2006
In the last episode (Jan 26), Paul Schmehl said:
> --On Thursday, January 26, 2006 11:18:54 -0600 Dan Nelson <dnelson at allantgroup.com> wrote:
> >In the last episode (Jan 26), Paul Schmehl said:
> >>I'm fiddling with an app that was probably written for/on Linux.
> >>It configures fine, but when I make, I get the error "cannot find
> >>-ldl". Is there a FreeBSD equivalent for libldl? A workaround? A
> >>library that I'm missing?
> >
> >It's not needed on FreeBSD. The dlopen family of functions is in
> >libc. The configure script should probably have something like this
> >in it so it only uses libdl if it can't find dlopen with its current
> >set of libs::
> >
> >AC_SEARCH_LIBS(dlopen, dl)
>
> Dan, you're referring to configure.in, right? There's no AC_SEARCH
> in that at all. Do I just need to add a line? If so, does it matter
> where I add it?
Ya, configure.{in,ac}. It doesn't matter much where it goes; at the
bottom is probably safest. You will also need to remove any hardcoded
"-ldl" strings from Makefile.{in,am}. Configure will add "-ldl" to
$LIBS if it turns out to be required.
--
Dan Nelson
dnelson at allantgroup.com
More information about the freebsd-questions
mailing list