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


"Suhaib M. Siddiqi" <ssiddiqi@inspirepharm.com> writes:
> 
> 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.

But each of these can be dependent on other DLLs that your machine may
not have. The one in particular is DDRAW.DLL, which I know nothing about
but needed by GLIDE2X.DLL. That's why I suggested using the debugger
which prints out the various DLLs as they're being loaded. You can run
`objdump -p | grep "DLL Name"' on the DLLs as well to see what they
depend on. Please make sure your system has *ALL* these DLLs:

  glide-0-0-0.dll
  libgg-0-0-6.dll
  libggi-2-0-0.dll
  libgii-0-0-6.dll
  GLIDE2X.DLL
  DDRAW.dll		<< system dll

when you try to open glide-0-0-0.dll.

Build dlopen-test.exe with debugging (-g), and run it under gdb.

  $ gdb dlopen-test
  (gdb) b main
  (gdb) run glide-0-0-0.dll

when it stops in main, step (using 'n') until you hit the call to dlopen.
As soon you go past dlopen, gdb will print messages regarding loading these 
DLLs, and you may get more information that you. I see the following for
example (and it tells me that the loading was successful):

  26        dll_handle = dlopen (dllname, RTLD_LAZY | RTLD_GLOBAL);
  (gdb) n
  1a150000:d:\src\x11-stuff\dlopen-test\glide-0-0-0.dll
  1a1c0000:d:\src\x11-stuff\dlopen-test\libgg-0-0-6.dll
  1a220000:d:\src\x11-stuff\dlopen-test\libggi-2-0-0.dll
  warning: LDR: Automatic DLL Relocation in dlopen-test.exe

  warning: LDR: Dll glide-0-0-0.dll base 10000000 relocated due to 
    collision with Dynamically Allocated Memory

  warning: LDR: Automatic DLL Relocation in dlopen-test.exe

  warning: LDR: Dll libgg-0-0-6.dll base 10000000 relocated due to 
    collision with Dynamically Allocated Memory

  warning: LDR: Automatic DLL Relocation in dlopen-test.exe

  warning: LDR: Dll libggi-2-0-0.dll base 10000000 relocated due to 
    collision with Dynamically Allocated Memory

  1a290000:d:\src\x11-stuff\dlopen-test\libgii-0-0-6.dll
  1a2f0000:d:\src\x11-stuff\dlopen-test\GLIDE2X.DLL
  77130000:C:\WINNT\System32\DDRAW.dll

  warning: LDR: Automatic DLL Relocation in dlopen-test.exe

  warning: LDR: Dll libgii-0-0-6.dll base 10000000 relocated due to 
    collision with Dynamically Allocated Memory

  warning: LDR: Automatic DLL Relocation in dlopen-test.exe

  warning: LDR: Dll GLIDE2X.DLL base 10000000 relocated due to 
    collision with Dynamically Allocated Memory


  [failed reading symbols from DLL]
  "C:\WINNT\System32\WINMM.dll": error reading line numbers


  [failed reading symbols from DLL]
  "C:\WINNT\System32\mmdrv.dll": error reading line numbers

  (gdb) print dll_handle
  $1 = (void *) 0x1a150000

I've cleaned up the gdb output a bit.

Regards,
Mumit


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