Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Message-ID: <003f01c21725$afec1a30$b800a8c0@sknet01>
From: "Anthony Kramer" <Anthony.Kramer@btinternet.com>
To: "Gerrit P. Haase" <gp@familiehaase.de>
Cc: <cygwin@cygwin.com>
References: <aelaa9$3f2$1@main.gmane.org> <194788282570.20020617223425@familiehaase.de> <001501c21647$a45506c0$a300a8c0@sknet01> <1874257866.20020618222720@familiehaase.de>
Subject: Re: Libtool link with dlopen support (on cygwin)
Date: Wed, 19 Jun 2002 01:10:14 +0100
MIME-Version: 1.0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000

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/

