[Ecls-list] Calling a function from C
Steven_Kilby at kofax.com
Steven_Kilby at kofax.com
Sat Oct 14 03:39:06 UTC 2006
Hi,
Nevermind, I've figured it out. I can call myp_hello directly. I need to
use the LISP symbol if I am going to call cl_funcall.
Thanks
Steven
Steven_Kilby at kofax.com
Sent by: ecls-list-bounces at lists.sourceforge.net
10/13/2006 08:05 PM
To
ecls-list at lists.sourceforge.net
cc
Subject
[Ecls-list] Calling a function from C
Hi,
I have a file called hello.lsp with the following contents:
(in-package "MYP")
(proclaim '(si::c-export-fname hello))
(defun hello()
'("A list with a string"))
In ecl I type the following:
(make-package "MYP" :use '("COMMON-LISP"))
(load "hello.lsp")
(compile-file "hello.lsp")
This produces a .fas file and should have an exported function name
"myp_hello".
Then, from a C file I would like to do something similar to:
cl_safe_eval("(make-package "MYP" :use '(\"COMMON-LISP\"))");
cl_safe_eval("(load \"hello.fas\"));
cl_funcall(1, cl_intern(1, "myp_hello"));
The two calls to cl_safe_eval work as expected, but the call to cl_funcall
fails. Anyone have any ideas?
Thanks
Steven
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job
easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Ecls-list mailing list
Ecls-list at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ecls-list
More information about the ecl-devel
mailing list