FFI Calls in clisp 
Author Message
 FFI Calls in clisp

Hi, I am relatively new to lisp, and I would like to call a library
function(written in C) from clisp.  I've been going through the
documentation for the FFI package, and it seems like I have to do some
library linking before I even start the lisp interpreter.  Is their any
way to load up the library(or just specify it?) in the middle of
execution?  For example, lets say I wanted to call printf from the
standard C library, what would I do?  Code examples are very welcome.

I am using GNU Clisp as my interpreter.

Conan K Woods



Thu, 11 Nov 2004 05:44:14 GMT  
 FFI Calls in clisp


Quote:
> Hi, I am relatively new to lisp, and I would like to call a library
> function(written in C) from clisp.  I've been going through the
> documentation for the FFI package, and it seems like I have to do some
> library linking before I even start the lisp interpreter.  Is their any
> way to load up the library(or just specify it?) in the middle of
> execution?  For example, lets say I wanted to call printf from the
> standard C library, what would I do?  Code examples are very welcome.

> I am using GNU Clisp as my interpreter.

Use the UFFI code if you can.  That way your code will be portable
across implementations.

Cheers

--
Marco Antoniotti ========================================================
NYU Courant Bioinformatics Group        tel. +1 - 212 - 998 3488
719 Broadway 12th Floor                 fax  +1 - 212 - 995 4122
New York, NY 10003, USA                 http://bioinformatics.cat.nyu.edu
                    "Hello New York! We'll do what we can!"
                           Bill Murray in `Ghostbusters'.



Sat, 13 Nov 2004 22:42:53 GMT  
 FFI Calls in clisp

Quote:

> * On the subject of "FFI Calls in clisp"
> * Sent on Sat, 25 May 2002 14:44:14 -0700

> Hi, I am relatively new to lisp, and I would like to call a library
> function(written in C) from clisp.  I've been going through the
> documentation for the FFI package, and it seems like I have to do some
> library linking before I even start the lisp interpreter.  Is their
> any way to load up the library(or just specify it?) in the middle of
> execution?  For example, lets say I wanted to call printf from the
> standard C library, what would I do?  Code examples are very welcome.

this functionality (loading DLLs during run time) is being developed by
Joerg Hoehle now.  Please subscribe to <clisp-list> (visit
<http://clisp.cons.org> for details) and ask your question there.
[this is a CLISP-specific question, so you are more likely to get
attention of the right people on a CLISP-specific forum]
If you look through the list archives carefully, you will find the
patches too.

--
Sam Steingold (http://www.podval.org/~sds) running RedHat7.2 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>
usually: can't pay ==> don't buy. software: can't buy ==> don't pay



Sat, 13 Nov 2004 22:51:47 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. FFI in CLISP for WIN32

2. Clisp and FFI's to C++

3. Clisp FFI

4. Clisp FFI

5. CLISP FFI: C enumerations

6. CLISP FFI (win32)

7. FFI for CLISP: UDP sockets

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

9. Calling Haskell function from C (FFI) causes seg-fault (GHC,linux)

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

11. some clear examples for FFI call to a Windows api function in Franz Allegro for Windows

12. wanted: Emacs integrated CLISP env for NT, *AND* mathematics package for CLISP

 

 
Powered by phpBB® Forum Software