From: cabp28 AT strath DOT ac DOT uk (Michael Pymm) Subject: Ordinal problem in DLLs? 8 Jan 1998 13:33:11 -0800 Message-ID: <01BD1C42.14E4CC40.cygnus.gnu-win32@cerebus> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: "'gnu-win32 AT cygnus DOT com'" 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 AT 0 @1 etc etc where the second @ 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 AT cygnus DOT com" with one line of text: "help".