This is the mail archive of the
cygwin@sourceware.cygnus.com
mailing list for the Cygwin project.
Ordinal problem in DLLs?
- To: "'gnu-win32 at cygnus dot com'" <gnu-win32 at cygnus dot com>
- Subject: Ordinal problem in DLLs?
- From: Michael Pymm <cabp28 at strath dot ac dot uk>
- Date: Thu, 8 Jan 1998 14:31:15 -0000
Hi all,
I'm trying to use the compiler to write apps that use the 3Dfx card via glide2x.dll (Glide 2.43 I think).
I've tried the following to create a library to link my programs against;
using nm to get the exports from the dll, and then dlltool
using impdef to get both the calling stack size and the ordinal number, then dlltool
A typical .def file looks like
EXPORTS
grGlideInit@0 @1
etc etc
where the second @<number> is the ordinal number (which is the correct one) (only produced when I
use impdef, not nm)
dlltool is called using the -k argument.
gcc compiles the .exe fine, but Win95 says 'invalid file format' when I try to run it.
Finally, lcc's impdef creates a glide2x.lib that gcc links against successfully, but the resulting .exe has
the same problem. However, lcc produces a correct .exe with this library. I think therefore that gnu ld
is where the problem is.
I've looked in every FAQ and archive I can find but there are no explicit instructions on how to do this.
Suggestions I've had from the glide mailing list say that there is a problem with ordinals in some DLLs.
Do I need a later version of dlltool? (I'm using that supplied with gnu-win32 b18).
Thanks for any help
Michael
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".