This is the mail archive of the cygwin-xfree@sourceware.cygnus.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]

RE: dlopen error



Ok, now when I ran objdump I get the listing.

DLL Name"
        DLL Name: libgg-0-0-6.dll
        DLL Name: libggi-2-0-0.dll
        DLL Name: libgii-0-0-6.dll
        DLL Name: cygwin1.dll
        DLL Name: Glide2x.dll
        DLL Name: kernel32.dll

So what I did I copied all these DLLs into the same directory where
glide-0-0-0.dll is.  Now the error message changed from 127 to 12, i.e
The specified module could not be found.
I do not which other module it is searching.
This a Windows NT, machine with Banshee/Voodoo card and its drivers
installed.  Therefore, hardware cannot be an issue.

Suhaib


> -----Original Message-----
> From: cygwin-xfree-owner@sourceware.cygnus.com
> [mailto:cygwin-xfree-owner@sourceware.cygnus.com]On Behalf Of Mumit Khan
> Sent: Sunday, July 11, 1999 2:10 PM
> To: Suhaib M. Siddiqi
> Cc: Cygwin-Xfree@Sourceware.Cygnus.Com
> Subject: Re: dlopen error
>
>
> "Suhaib M. Siddiqi" <ssiddiqi@inspirepharm.com> writes:
> > Mumit once mentioned that dlopn error is a bug in Cygwin.
> > Anyone has any suggestions on a wrokaround for the following problem?
> > When I satrt X-server for Glide, I get dlopen error *unable to open lib:
> > dlopen: Win32 error 127*.
> > The dll is in path.  libGGI finds it and reports the correct
> > path:/usr/local/lib/ggi\display/glide-0-0-0.dll, but still returns the
> > dlopen failure.
>
> Here's a quick test program to see if you can load ggi-0-0-0.dll using
> dlopen succesfully. Run it with the full pathname as in ggi does and
> see what happens.
>
> Another problem is all the DLLs are based at default 0x10000000, and
> causes relocation all over the place. I added code dllwrap precisely
> because of this to use the output filename as a hash key and generate
> a base address (if not user specified of course) to avoid this relocation
> and resultant excessive copying by windows32 loader.
>
> You'll need to at some point build the whole thing with -g and run it
> under gdb. No easy way, sorry.
>
> #include <stdio.h>
> #include <stdlib.h>
> #include <unistd.h>
> #include <dlfcn.h>
>
> /* see comment about 2nd arg to dlopen on Cygwin. */
> #ifndef RTLD_GLOBAL
> # define RTLD_GLOBAL 0
> #endif
>
> int
> main (int argc, char *argv[])
> {
>   void *dll_handle;
>   char *dllname;
>   if (argc != 2)
>     {
>       fprintf (stderr, "Usage: %s dll-name\n", argv[0]);
>       return 1;
>     }
>   dllname = argv[1];
>
>   printf ("PATH = %s\n", getenv ("PATH"));
>
>   /* the second arg is ignored on Cygwin, here for exposition only. */
>   dll_handle = dlopen (dllname, RTLD_LAZY | RTLD_GLOBAL);
>   if (! dll_handle)
>     {
>       fprintf (stderr, "%s\n", dlerror ());
>       return 1;
>     }
>
>   printf ("Success: DLL handle %x\n", dll_handle);
>   dlclose (dll_handle);
>   return 0;
> }
>
>


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