[Top][All Lists]

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

Libtool link with dlopen support (on cygwin)

From: Anthony Kramer
Subject: Libtool link with dlopen support (on cygwin)
Date: Mon, 17 Jun 2002 19:38:06 +0100


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, libtool always complains while linking
the executable:
libtool: link: warning: `AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen

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

The relevant sections of the 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}/
foo_DEPENDENCIES = @LIBINTL@ ${top_builddir}/
EXTRA_DIST = foo.h

Thanks in advance,

reply via email to

[Prev in Thread] Current Thread [Next in Thread]