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
······@unbc.ca
Conan K Woods <······@unbc.ca> writes:
> 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'.
> * In message <········································@ugrad.unbc.ca>
> * On the subject of "FFI Calls in clisp"
> * Sent on Sat, 25 May 2002 14:44:14 -0700
> * Honorable Conan K Woods <······@unbc.ca> writes:
>
> 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