Subject: [clisp-list] Making Foreign Function Calls on Win32

From: "Terry R. Payne" <[email-masked]>
Date: Fri Jan 18 10:10:04 2002

People,
	I'm trying to make C foreign function calls on a Windows
platform (ideally calling out to C++ functions compiled using
Visual Studio).

I've found the section on calling external functions in the
Implementation notes [1], and it all looks straight forward
(famous last words).  However, it would appear that I need an
executable "clisp-link", which doesn't appear in my distribution.

Have I understood the documentation correctly; i.e. that I need
to call clisp-link to create a module, or is this a UNIX only
method, and a separate method is required for foreign function calls
on Win32 (external modules, that use clisp-link, are UNIX only [2])?

Thanks,
	Terry

[1] http://clisp.cons.org/impnotes.html#dffi
[2] http://clisp.cons.org/impnotes.html#modules
_____________________________________________________________________
Terry R. Payne, PhD.    | http://www.cs.cmu.edu/~terryp/index.html
CMU, Robotics Institute | Voice: (412) 268-8780 Fax: (412) 268-5569
Pittsburgh, PA 15213    | Email: [email-masked] or [email-masked]

---

From: "Bruce L. Lambert, Ph.D." <[email-masked]>
Date: Fri Jan 18 10:22:02 2002

Hi folks,

I am having some trouble getting ilisp working on my Solaris 8 sparc clone. 
I'm pretty sure my problems are basic. I did read and follow the manual, 
but I still cannot get ilisp to start up correctly. I don't want to waste 
bandwidth on the list, but if someone is willing to walk me through ilisp 
setup, I'd be very grateful. Please contact me off list.

-bruce

---

From: Sam Steingold <[email-masked]>
Date: Fri Jan 18 11:33:06 2002

> * In message <[email-masked]>
> * On the subject of "[clisp-list] Making Foreign Function Calls on Win32"
> * Sent on Fri, 18 Jan 2002 13:07:10 -0500
> * Honorable "Terry R. Payne" <[email-masked]> writes:
>
> However, it would appear that I need an executable "clisp-link", which
> doesn't appear in my distribution.

this is a unix-specific shell script.

> Have I understood the documentation correctly; i.e. that I need to
> call clisp-link to create a module, or is this a UNIX only method, and
> a separate method is required for foreign function calls on Win32
> (external modules, that use clisp-link, are UNIX only [2])?

clisp-link and dynamic modules are unix-only at the moment.

using libltdl (part of gnu libtool) should make it possible to port
dynamic modules to win32.  would you like to work on that?

I don't use FFI myself, so I cannot really help you here.

I suspect that linking lisp.exe with your *.obj files and using the
resulting executable to compile and load the FFI forms you write should
work.

-- 
Sam Steingold (http://www.podval.org/~sds)
Keep Jerusalem united! <http://www.onejerusalem.org/Petition.asp>
Read, think and remember! <http://www.iris.org.il> <http://www.memri.org/>
Life is like a diaper -- short and loaded.