Subject: Re: How to build callable dll with gnu-win32
From: [email-masked] (David Essex)

13 Dec 1996 06:35:20 -0800
Sender: [email-masked]
Approved: [email-masked]
Distribution: cygnus
Message-ID: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
X-Sender: [email-masked] (Unverified)
X-Mailer: Windows Eudora Light Version 1.5.4 (32)
Original-To: "wiljan" <[email-masked]>
Original-Cc: gnu-win32 <[email-masked]>
Original-Sender: [email-masked]

At 08:15 PM 11/12/96 +0100, you wrote:

>Lakovos Karakas wrote:
>> I would like to build a dll using the gnu win32 development tools
>> and then call the functions of the dll from visual basic 4.
>> Is this possible and if it is how can I do it ( I mean dlltool or gcc and
>> ld options).
>> I have already tested according to cygnus documentation and successfully
>> produce the dll but when I am truing to call it from vb
>> I got an error. Error in loading DLL.
>
>I have also been trying to do this.
>Right now I know how to build the DLL,
>but as soon as they are getting interesting they will not work any more.
>
>When I build a trival DLL I have no problem.
>With that I mean a dll with only a routine and an entry point.
>I can link it together and call it from visual basic.
>
>When I make it more complex, the dll is not loadable anymore.
>I have now found that this is because there is rubbish data in the dll
>when I view it with quickview of NT.
>I wrote a small program that just loads such a dll dynamically, as VB
>also does, to determine the reason that it can not be loaded.
>
>When I load these dlls I get weird popup messages that indicate that
>NT can not find certain dlls. The message holds weird (random data) names
>for the dlls missing. This is also what quickview of NT tells me.
>
>This inidicates that there must me a problem with the linker somehow.
>
>Can someone help me finding the real course of this ??
The problem is due to incompatablity between gnu-win32 and win32 DLLs. I 
recently read a magazine article(1) relating to this problem.

>I think this is also important for other users that this works properly.
There has been some discussion on this recently, (see "Problems building dlls 
with cygwin" thread) but to my knowledge this issue has not been resolved.

Good luck

David

(1) Windows Developer's Journal, August 1996, "Building Win32 DLL's the
right way".  

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