[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.
 
Michael.
 


________________________________

	From: ecls-list-bounces at lists.sourceforge.net
[mailto:ecls-list-bounces at lists.sourceforge.net] On Behalf Of Mark
Carter
	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>
	
	main()
	{
	  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
	    ./a.out
	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:
	
	main()
	{
	    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
<http://uk.answers.yahoo.com/;_ylc=X3oDMTEydmViNG02BF9TAzIxMTQ3MTcxOTAEc
2VjA21haWwEc2xrA3RhZ2xpbmU> .


________________________________

	Copy addresses and emails from any email account to Yahoo! Mail
- quick, easy and free. Do it now...
<http://us.rd.yahoo.com/mail/uk/taglines/yahoo_com/trueswitch/*http://uk
.docs.yahoo.com/trueswitch2.html> 

-------------- 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