[Ecls-list] Getting "hello world" going

Goffioul Michael goffioul at imec.be
Fri Aug 24 10:51:54 UTC 2007

You have to initialize ECL engine before calling ECL functions. Use
cl_boot for this.


	From: ecls-list-bounces at lists.sourceforge.net
[mailto:ecls-list-bounces at lists.sourceforge.net] On Behalf Of Mark
	Sent: Friday 24 August 2007 11:50
	To: Mark Carter; ecls-list at lists.sourceforge.net
	Subject: Re: [Ecls-list] Getting "hello world" going
	I know I'm being a bit vague here, but it's not really happening
for me. . Suppose, instead, I have hello.c:
	#include <ecl/ecl.h>
	  cl_object form, result;
	  form = c_string_to_object("(+ 1 2)");
	  result = si_safe_eval(4,form, Cnil, OBJNULL );
	and I compile it using
	    gcc -lecl hello.c
	When I type
	I get
	    Segmentation Fault
	----- Original Message ----
	From: Mark Carter <mcturra2000 at yahoo.co.uk>
	To: ecls-list at lists.sourceforge.net
	Sent: Friday, 24 August, 2007 12:07:18 AM
	Subject: [Ecls-list] Getting "hello world" going
	I am trying to call Lisp code from C.
	Suppose I have the Lisp file sayhello.lisp:
	(defun say-hello () 
	    (print "hello world"))
	and a C file hello.c:
	    say_hello();  /* ?? */
	How do I compile everything into a program so that it all works?



	Yahoo! Answers - Get better answers from someone who knows. Try
it now
2VjA21haWwEc2xrA3RhZ2xpbmU> .


	Copy addresses and emails from any email account to Yahoo! Mail
- quick, easy and free. Do it now...

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/ecl-devel/attachments/20070824/c57ecf35/attachment.html>

More information about the ecl-devel mailing list