FFI in CLISP for WIN32 
Author Message
 FFI in CLISP for WIN32

Hello,

I have been browsing CLISP doc, the Internet, and this NG about FFI in
CLISP/win32, but I found no practical examples.
The CLISP-LINK utility is always mentionned and does not seem to be
included in the WIN32 release; is it LINUX specific?
Has anybody already used CLISP's FFI interface in WIN32? Would it
be possible to see an example?
I would simply like to call a C function that creates a YES/NO
menu box and returns a boolean for example.

Thank you in advance,




Mon, 31 Oct 2005 17:11:31 GMT  
 FFI in CLISP for WIN32
Its bundled with the cygwin version of Clisp on Win2K and is very well
documented at this site for an example ...

http://www.niksula.cs.hut.fi/~tsiivola/html/clisp-ffi-howto.html

And the clisp docs.

Take Care


Quote:
> Hello,

> I have been browsing CLISP doc, the Internet, and this NG about FFI in
> CLISP/win32, but I found no practical examples.
> The CLISP-LINK utility is always mentionned and does not seem to be
> included in the WIN32 release; is it LINUX specific?
> Has anybody already used CLISP's FFI interface in WIN32? Would it
> be possible to see an example?
> I would simply like to call a C function that creates a YES/NO
> menu box and returns a boolean for example.

> Thank you in advance,





Tue, 01 Nov 2005 01:48:51 GMT  
 FFI in CLISP for WIN32
Hi!

thank you for this interesting reference.
Actually, this sites talks about CLISP FFI on Debian. I could not find
anything about win32.
I'll try Cygwin, but I would prefer to use MINGW and "native" win32 code.
Any idea?

Yours,


Quote:
----- Original Message -----

Newsgroups: comp.lang.lisp
Sent: Thursday, May 15, 2003 7:48 PM
Subject: Re: FFI in CLISP for WIN32

> Its bundled with the cygwin version of Clisp on Win2K and is very well
> documented at this site for an example ...

> http://www.niksula.cs.hut.fi/~tsiivola/html/clisp-ffi-howto.html

> And the clisp docs.



Wed, 02 Nov 2005 02:19:00 GMT  
 FFI in CLISP for WIN32

Quote:

> * On the subject of "Re: FFI in CLISP for WIN32"
> * Sent on Fri, 16 May 2003 20:19:00 +0200

> I'll try Cygwin, but I would prefer to use MINGW and "native" win32 code.

Jorg Hohle published _vast_ and very helpful tutorials on CLISP FFI.
Search <clisp-list> archives on <http://clisp.cons.org>.

--
Sam Steingold (http://www.podval.org/~sds) running RedHat9 GNU/Linux
<http://www.camera.org> <http://www.iris.org.il> <http://www.memri.org/>
<http://www.mideasttruth.com/> <http://www.palestine-central.com/links.html>
Small languages require big programs, large languages enable small programs.



Wed, 02 Nov 2005 03:36:53 GMT  
 FFI in CLISP for WIN32

I know zero about Win32 prgramming...

...I was looking into CLISP on CygWin, because it now has Xfree86
But came across the /dev/windows (message queue) device.

I'm not sure it's limitations compared to the Win API,
but it might be interesting from serve-event (select()) style.



Thu, 03 Nov 2005 12:03:33 GMT  
 FFI in CLISP for WIN32

Quote:

> I have been browsing CLISP doc, the Internet, and this NG about FFI in
> CLISP/win32, but I found no practical examples.

Indeed, they are lacking. CLISP FFI on native win32 was the forgotten
stepdaughter until I showed last year in clisp-list how to bring it to
life ("how to use the regexp module on MS-Windows").
I hope that since then, the regexp module has become part of
MS-Windows binary distributions, but I haven't checked.

Quote:
> I would simply like to call a C function that creates a YES/NO
> menu box and returns a boolean for example.

Esp. GUI examples are lacking, since AFAIK nobody ever used the
MS-Windows API via CLISP's FFI and there's nothing like CAPI (known
from lispworks). Dan Stanger wrote a gdi module (which uses the FFI)
to use OpenGL to do GUI stuff: that's independent on the OS' native
GUI. I enjoyed running his demo on my MS-w2k box. I haven't used gdi
for quite some time now.

Quote:
> The CLISP-LINK utility is always mentionned and does not seem to be
> included in the WIN32 release; is it LINUX specific?

UNIX-specific. But you don't need it.

Quote:
> Has anybody already used CLISP's FFI interface in WIN32? Would it
> be possible to see an example?

I did, but only for toy examples (call "sleep" from
kernel.dll). You'll most probably need my last-year's patches (see
clisp-list archives) to enable calling foreign functions from
arbitrary foreign libraries, which I have not yet found time to
finalize into a portable (OS independent across at least UNIX,
MS-Windows and AmigaOS) system for calling arbitrary functions in
shared libraries from CLISP.

Or you get a CLISP with gdi module and write GUI stuff using
gdi/OpenGL.

Or you compile CLISP from sources and link your C function which does
GUI stuff, since your code already exists. I have an article about
"extending CLISP via external modules" which goes into details, but
the FFI section from impnotes.html and my e-mail about enabling regexp
on MS-Windows should be enough for the simple interface your describe.
(def-call-out ask-user
  (:arguments (message c-string))
  (:return-type boolean) (:language :stdc))

Or you investigate the cygwin approach, which gives you a CLISP in a
UNIX environment, maybe X, but no native MS-Windows library calls.

Regards,
        Joerg Hoehle
TSI ITC-Security



Mon, 28 Nov 2005 18:35:22 GMT  
 FFI in CLISP for WIN32

Quote:

> * On the subject of "Re: FFI in CLISP for WIN32"
> * Sent on 12 Jun 2003 12:35:22 +0200

> > The CLISP-LINK utility is always mentionned and does not seem to be
> > included in the WIN32 release; is it LINUX specific?
> UNIX-specific. But you don't need it.

indeed.

OTOH, it is very convenient, and with mingw there is no reason not to
use it (except that the binary it creates crashes on startup).

--
Sam Steingold (http://www.podval.org/~sds) running RedHat9 GNU/Linux
<http://www.camera.org> <http://www.iris.org.il> <http://www.memri.org/>
<http://www.mideasttruth.com/> <http://www.palestine-central.com/links.html>
Old Age Comes at a Bad Time.



Fri, 02 Dec 2005 04:57:40 GMT  
 
 [ 7 post ] 

 Relevant Pages 

1. CLISP FFI (win32)

2. Clisp and FFI's to C++

3. Clisp FFI

4. FFI Calls in clisp

5. Clisp FFI

6. CLISP FFI: C enumerations

7. FFI for CLISP: UDP sockets

8. FFI for Clisp on PPC (OS X and Fink)

9. Fun-O Win32 FFI Question

10. problems using FFI for Win32 calls in MITscheme7.4

11. bit-manipulation and Win32 FFI help needed.

12. Win32 Installation problem with clisp-2.28

 

 
Powered by phpBB® Forum Software