This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Libtool link with dlopen support (on cygwin)


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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]