This is the mail archive of the 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]

libltdl + dlopen/LoadLibrary [Was: Re: gcc 3.3.1-3, loading .la filesfrom gcj-compiled apps]

Christopher Faylor wrote:

On Sun, Nov 02, 2003 at 12:20:47PM -0700, Marcus G. Daniels wrote:

Would it be possible to add a -D_WIN32 to the libjava/libltdl Makefile for Cygwin? Then the LoadLibrary support will get compiled-in, and dynamic libraries can be loaded into GCJ apps.

No.  If there is dynamic linking to be done it should work through
dlopen and pals.  Defining _WIN32 is not the way to accomplish this.

Hmmm... I've been having problems compiling cvs-m4 which HEAVILY uses the libltdl library-loading functionality. I wonder if it could be related to this:

From ltdl.c:
#if __CYGWIN__
    char wpath[MAX_PATH];
    cygwin_conv_to_full_win32_path(searchname, wpath);
    module = LoadLibrary(wpath);
  module = LoadLibrary (searchname);
  LT_DLFREE (searchname);

It appears that current libtool does in fact use LoadLibrary and not dlopen. This worked fine in the past (perhaps pre-1.5.0?) but appears to not work as well anymore.

Should the module-loading functionality in libtoool for cygwin be reworked to use dlopen instead?


Unsubscribe info:
Problem reports:

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