Subject: Re: DLL problems.

From: Jan Wielemaker <[email-masked]>
Date: Tue, 8 Jun 1999 16:42:24 +0200

On Tue, 08 Jun 1999, Sergio Arias Sanchez wrote:
>>Loading however should be fine.  Please be more specific about what
>>you are doing.  Where is the .DLL file?  Can you verify install() is
>>indeed exported from it (using dumpbin (?) or so).  How do you call
>>load_foreign_library/1 and what is the exact message?
>>
>
>Well, the printf() stuff was just an attempt, I tried other things (manual examples 
>included) with the same result.
>I checked the DLL to see if install() was indeed exported and I saw that what it is 
>exported is a kind of install, ?install@@YAXXZ, so THIS was the problem (thanks). 
>The thing is that I get this function name instead of "install" in every DLL, the 
>problem is solved (I just have to call ?install@@YAXXZ instead of install) and since 
>nobody has reported a similar case I suppose it has something to do with the C 
>compiler.

You probably compile using C++.  In that case do

extern "C" {
install_t
install()
....
}

to avoid C++ name-mangling.  Thats better than calling install@@YAXXZ
cause you never know when that will change (other compiler, ...)

	Cheers --- Jan