From: colin AT fu DOT is DOT saga-u DOT ac DOT jp (Colin Peters) Subject: RE: Building an import lib from a DLL - egcs 1.1 7 Oct 1998 22:09:25 -0700 Message-ID: <007401bdf1d1$ad77a440$fa173185.cygnus.gnu-win32@gbird0.fu.is.saga-u.ac.jp> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit To: "Thomas Nichols" Cc: "GNU-win32" Thomas Nichols wrote: >At 11:54 07/10/98 +0900, Colin Peters wrote: >>.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) ? That will work, and in some cases it is simpler than going off to look at the header files and then figure out what the necessary numbers are. And yes, I do mean the numbers after the @ in the function name. >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. That's right as far as I know, and that will also work. As for there being an Easier Way... I wish there was but I don't know of one. It would seem to require at least the ability to parse header files and a knowledge of the size of various arguments. To be really useful it seems to me a program to do this would have to be non-trivial. >>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. For short stuff posting to the list is usually ok, or, if you have space on a web server, an URL is preferred (especially nice if you are willing to distribute binaries of the import libraries etc.) I'm willing to host stuff on my web pages if there is nowhere else you can think to put it. I don't suppose it would make much sense to send it to compiler builders like Mumit directly, unless it seems like it should be included in the base compiler distribution (which, frankly, mSQL does not... :-/) It is possible that a 'porting' site or server for Cygwin32 'extra stuff' might be interested as well (like that site in Germany that I can't think of the URL of at the moment). Colin. - Colin Peters - colin at fu.is.saga-u.ac.jp - http://www.geocities.com/Tokyo/Towers/6162/index.html - Go not to usenet for counsel, for it will say both - 'yes' and 'no' and 'try another newsgroup'. - 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".