This is the mail archive of the
cygwin@cygwin.com
mailing list for the Cygwin project.
Re: Libtool link with dlopen support (on cygwin)
- From: "Anthony Kramer" <Anthony dot Kramer at btinternet dot com>
- To: "Gerrit P. Haase" <gp at familiehaase dot de>
- Cc: <cygwin at cygwin dot com>
- Date: Wed, 19 Jun 2002 01:10:14 +0100
- Subject: Re: Libtool link with dlopen support (on cygwin)
- References: <aelaa9$3f2$1@main.gmane.org> <194788282570.20020617223425@familiehaase.de> <001501c21647$a45506c0$a300a8c0@sknet01> <1874257866.20020618222720@familiehaase.de>
I am aware how windows does not allow undefined symbols (yes, -no-undefined
is passed to libtool). The problem is that there arent any undefined symbols
present. I explcitly use function pointers and the dl{open,sym,close} calls,
rather than relying on a compile-time link against the import library. The
files build (and run) fine when built manually on the command line (using
gcc -shared for the dll, and nothing extra for the executable, no -l flags)
, which leads me to beleve that the error lies with the cygwin patches on
libtool. Libtool
should not link against the import library if -dlopen /path/to/library.la is
used as part of the _LDFLAGS.
This only ever happens on cygwin... the files build fine on linux, solaris,
and freebsd and are dlopen'able.
Thanks,
Anthony
----- Original Message -----
From: "Gerrit P. Haase" <gp@familiehaase.de>
To: "Anthony Kramer" <anthony.kramer@btinternet.com>
Sent: Tuesday, June 18, 2002 9:27 PM
Subject: Re: Libtool link with dlopen support (on cygwin)
> Hallo Anthony,
>
> Am Montag, 17. Juni 2002 um 23:40 schriebst du:
>
> > Libtool is supposed to handle the linking. There should be no link
taking
> > place for the dll itself, it is only supposed be linked at runtime via
> > dlopen.
>
> > The libtool documentation states that -dlopen
/path/to/libtool/library.la
> > should be placed in the _LDFLAGS. This causes libtool to link the import
> > library, and AFAICT it shouldn't.
>
> The problem is not because of libtool but because of Windows.
> Here are no undefined symbols allowed so ld looks into the
> importlib to see if it finds the symbols. One can say that
> this is linking, but there are just the symbols which are
> resolved. Actual the 'linked' dll gets opened during runtime
> 'on request'.
>
> Gerrit
> --
> =^..^=
>
--
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/