Subject: Re: Building an import lib from a DLL - egcs 1.1
From: [email-masked] (Thomas Nichols)

7 Oct 1998 14:52:57 -0700
Message-ID: <[email-masked]>
References: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
To: [email-masked]
Cc: [email-masked]

Thanks Earnie,

but the only docs I can find at Mumit's site are the ones on *creating*
reloc DLLs, which I'd already studied. I tried

dlltool --output-def mSQL.def --export-all-symbols --dllname mSQL.dll

which generated a def file with the dlltool pathname, a line saying
"EXPORTS", and nothing else.

I have a workaround - I studied msql.h, which has prototypes for all DLL
exported functions, then built a def file by taking the function name and
appending "@4", "@8" etc depending on the sizes of parameters passed in.
Using dlltool with -k built me a usable libmsql.a, which is working ok. But
for future reference - what *should* I have done here? When you say "Search
the archives", I can't _find_ any archives!? The ones at cygwin /
eGroups.com only showed me 4 for "egcs export DLL" and 6 for "gnu-win32
export DLL", of which the only relevant one I can see is

http://www.eGroups.com/list/gnu-win32/md1025538797.html

from Mumit Khan, saying that he used the Borland BC5 "impdef" tool to do
what I'm trying to do.

Does anyone have any other suggestions? What am I doing wrong, or is this
just not supported?

Thanks a lot,
Regards,
Tom.

At 11:58 06/10/98 -0700, Earnie Boyd wrote:
>
>---Thomas Nichols <[email-masked]> wrote:
>>
>> Hello,
>> 
>> Please excuse this message if it's in the wrong place - the egcs
>mailing
>> list seems to be un*x rather than win32, is that right?
>> 
>> I have a DLL - mSQL.dll from the MiniSQL package at
>> http://www.hughes.com.au - for which I want to generate an import
>library
>> for use with the egcs 1.1 compiler. I can't get dlltool to do what I
>want.
>> 
>> I need basically the same behaviour I'd get from Watcom's wlink
>>     - input a DLL
>>     - output an import lib with stubs for all exported functions.
>> 
>> Can I do this? Do I have to write a manual DEF file with an entry
>for each
>> export? Do I then have to work out the size of the parameters and
>set the
>> suffix to @4, @8 etc? This is how I got the Bullet library at
>> http://www.40th.com - very fast database engine -working some time
>ago, and
>> I don't fancy it for the whole mSQL API. I just want to use the
>mSQL.dll
>> functions in my code while using the egcs compiler - is it possible?
>
>1) Goto Mumit Khan's page.  If you can't find it I have a pointer on
>my page.
>2) Search the archives.
>
>==
>-                \\||//
>-----------o0O0--Earnie--0O0o------------
>--        [email-masked]        --
>-- http://freeyellow.com/members5/gw32 --
>--------------ooo0O--O0ooo---------------
>
>PS: Newbie's, you should visit my page.
>_________________________________________________________
>DO YOU YAHOO!?
>Get your free @yahoo.com address at http://mail.yahoo.com
>
>

-
For help on using this list (especially unsubscribing), send a message to
"[email-masked]" with one line of text: "help".