gcl-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gcl-devel] Interfacing C libraries and lisp.


From: Camm Maguire
Subject: Re: [Gcl-devel] Interfacing C libraries and lisp.
Date: 11 Jun 2002 21:11:35 -0400

Greetings!  Maybe try this, with your code in ff.lsp:


>(compile-file "ff.lsp")

Compiling ff.lsp.
End of Pass 1.  
End of Pass 2.  
OPTIMIZE levels: Safety=0 (No runtime error checking), Space=0, Speed=3
Finished compiling ff.lsp.
#p"ff.o"

>(load "ff.o")

Loading ff.o
start address -T 832c234 Finished loading ff.o
88

>(foobar "hello world")
hello world
NIL

-lc is linked into gcl already.  If you need another lib, let me know
 and I'll dig through the docs -- there is some lisp variable which
 adds libaries to the command line.

take care,


Conan <address@hidden> writes:

> Hi, I hope this is the correct list to post this on.
> 
> I have been having a heck of a time interfacing C and lisp using gcl.  I
> am attempting to call a few opengl routines from gcl.  I would be happy if
> I could even call printf from gcl, so lets use that as an example. 
> 
> (defentry foobar (string) (void "printf"))
> 
> The way I understand it, this creates a lisp function that calls the c
> function printf, which returns void and takes a string argument.
> 
> I believe this function has to be compiled somehow, but I am not entirely
> clear on this.
> 
> The biggest issue I have is how to actually load the library that contains
> printf, or whatever other functions I happen to need.
> 
> 
> I am running gcl 2.5 using Debian GNU/Linux.
> 
> Anybody have any advice?  I have found hardly any documentation to help me
> with this.
> 
> Conan K Woods
> address@hidden
> 
> 
> _______________________________________________
> Gcl-devel mailing list
> address@hidden
> http://mail.gnu.org/mailman/listinfo/gcl-devel
> 
> 

-- 
Camm Maguire                                            address@hidden
==========================================================================
"The earth is but one country, and mankind its citizens."  --  Baha'u'llah



reply via email to

[Prev in Thread] Current Thread [Next in Thread]