Libtool link with dlopen support

Anthony Kramer Anthony.Kramer@btinternet.com
Mon Jun 17 05:08:00 GMT 2002


Hi,

I have been trying to use libtool (libtool-devel 20020502-2) to link an
executable against a libtool library (built as a dll). The library builds
sucessfully as a dll, and does export the required symbols as indicated by
nm. The trouble comes when trying to link the executable that uses this dll.

Despite having AC_LIBTOOL_DLOPEN and AC_LIBTOOL_WIN32_DLL before the
AC_PROG_LIBTOOL in my configure.ac, libtool always complains while linking
the executable:
libtool: link: warning: `AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen
support.

Libtool then proceeds to extract a list of symbols in my executable and
library and trying to link them in. This is only ever of use when using
libltdl, which I chose not to do, since in my experience it is very buggy
(this may no longer be true, in which case I will try to use it, if it
helps). After generating the symbol list, the executable is linked against
the import library for the dll.

How do I make libtool not link against the import library for the dll?
I have followed the docs as best I could, but have probably missed something
obvious that is cygwin specific, since the same code works and links fine
under linux, using CVS libtool (HEAD branch of 2 weeks ago). Can I use CVS
libtool on cygwin? Have the cygwin patches made it into the official CVS
yet?

The relevant sections of the Makefile.am is (foo is the executable, bar is
the dll):

localedir = $(datadir)/locale

bin_PROGRAMS = foo
foo_SOURCES = foo.c
foo_CFLAGS = -DLOCALEDIR=\"$(localedir)\"
foo_LDFLAGS = @LTLIBINTL@ -dlopen ${top_builddir}/bar.la
foo_DEPENDENCIES = @LIBINTL@ ${top_builddir}/bar.la
EXTRA_DIST = foo.h

Thanks in advance,
Anthony



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/



More information about the Cygwin mailing list