www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1998/10/07/17:26:33

From: thomas DOT nichols AT iname DOT com (Thomas Nichols)
Subject: RE: Building an import lib from a DLL - egcs 1.1
7 Oct 1998 17:26:33 -0700 :
Message-ID: <3.0.2.32.19981007093644.006ca470.cygnus.gnu-win32@email.mcmail.com>
References: <004201bdf19d$df8a8a80$fa173185 AT gbird0 DOT fu DOT is DOT saga-u DOT ac DOT jp>
Mime-Version: 1.0
To: "Colin Peters" <colin AT fu DOT is DOT saga-u DOT ac DOT jp>
Cc: "GNU-win32" <gnu-win32 AT cygnus DOT com>

At 11:54 07/10/98 +0900, Colin Peters wrote:
>There is a utility called impdef (you can get it at
>http://www.geocities.com/Tokyo/Towers/6162/gcc-extra.html )
>which will
>output the exports of a dll in the correct format for a .def file.
>Unfortunately it doesn't work with dlls built with the latest MSVC compilers.

Thanks a lot for this, I'll give it a bash.



>Second problem is stdcall functions (with @nn at the end). This is a real
>bugger because there is no way to find out the number to put there just from
>the exports of a DLL (if wlink can properly generate such things then it is
>doing some magic-- possibly the compiler just doesn't use the @nn convention
>for stdcall functions). gcc needs those @'s and the correct numbers in the
>.def file. One way to figure out what numbers you need is to try to compile
>a program and simply copy the numbers given in the error messages.


Ummm.... does not compute?? Which numbers do you mean? Do you mean when it
tries to link it'll complain about missing externals, and I just look to
see what they're called (i.e. 4, @8 etc) ?

My workaround was to look in msql.h, and if the prototype was e.g.
msqlStandOnYourHead (int, int, char*)
then put
msqlStandOnYourHead AT 12
into the def file - 12 bytes of parameters. This seems to be working so
far, have I understood this aright? And surely There Must Be An Easier Way.

>Luckily
>you only have to do this once... it would be nice if you would make it
>available for others if you do.

When I'm sure it's solid I shall do so. What's the form here - post code
snippets to the list, or submit it to you/Mumit Khan/JanJaap or someone
else? I'll post it to the mSQL people as well.

Thanks for the advice,

Regards,
Tom.


-
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".

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019