From jan@swi.psy.uva.nl  Tue Jun  8 16:43:14 1999
Received: from gollem.swi.psy.uva.nl (jan@gollem.swi.psy.uva.nl [145.18.114.15])
	by swi.swi.psy.uva.nl (8.9.3/8.9.3) with ESMTP id QAA07418
	for <prolog@swi.psy.uva.nl>; Tue, 8 Jun 1999 16:43:14 +0200 (MET DST)
Received: from localhost (localhost [[UNIX: localhost]])
	by gollem.swi.psy.uva.nl (8.8.8/8.8.8) id QAA17657;
	Tue, 8 Jun 1999 16:44:32 +0200
From: Jan Wielemaker <jan@swi.psy.uva.nl>
To: "Sergio Arias Sanchez" <SARIAS@sag.es>
Subject: Re: DLL problems.
Date: Tue, 8 Jun 1999 16:42:24 +0200
X-Mailer: KMail [version 0.7.9]
Content-Type: text/plain
Cc: prolog@gollem.swi.psy.uva.nl
References: <s75d33fd.010@sag.es>
MIME-Version: 1.0
Message-Id: <99060816443209.15948@gollem>
Content-Transfer-Encoding: 8bit

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

