<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman,new york,times,serif;font-size:12pt"><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;">I know I'm being a bit vague here, but it's not really happening for me. . Suppose, instead, I have hello.c:<br><br>#include <ecl/ecl.h><br><br>main()<br>{<br> cl_object form, result;<br> form = c_string_to_object("(+ 1 2)");<br> result = si_safe_eval(4,form, Cnil, OBJNULL );<br>}<br><br>and I compile it using<br> gcc -lecl hello.c<br>When I type<br> ./a.out<br>I get<br> Segmentation Fault<br><br><br><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;">----- Original Message ----<br>From: Mark Carter <mcturra2000@yahoo.co.uk><br>To: ecls-list@lists.sourceforge.net<br>Sent: Friday, 24 August, 2007 12:07:18
AM<br>Subject: [Ecls-list] Getting "hello world" going<br><br><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><div>I am trying to call Lisp code from C.<br><br>Suppose I have the Lisp file sayhello.lisp:<br><br>(defun say-hello () <br> (print "hello world"))<br><br><br>and a C file hello.c:<br><br>main()<br>{<br> say_hello(); /* ?? */<br>}<br><br>How do I compile everything into a program so that it all works? <br></div></div><br>
<hr size="1">
Yahoo! Answers - Get better answers from someone who knows. <a rel="nofollow" target="_blank" href="http://uk.answers.yahoo.com/;_ylc=X3oDMTEydmViNG02BF9TAzIxMTQ3MTcxOTAEc2VjA21haWwEc2xrA3RhZ2xpbmU">Try
it now</a>.</div><br></div></div><br>
<hr size=1>
Copy addresses and emails from any email account to Yahoo! Mail - quick, easy and free. <a href="http://us.rd.yahoo.com/mail/uk/taglines/yahoo_com/trueswitch/*http://uk.docs.yahoo.com/trueswitch2.html">Do it now...</a></body></html>