Subject: Re: Libtool link with dlopen support (on cygwin)
From: "Anthony Kramer" <[email-masked]>
To: "Gerrit P. Haase" <[email-masked]>
Cc: <[email-masked]>
Date: Wed, 19 Jun 2002 01:10:14 +0100

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" <[email-masked]>
To: "Anthony Kramer" <[email-masked]>
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/