<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<STYLE type=text/css>DIV {
MARGIN: 0px
}
</STYLE>
<META content="MSHTML 6.00.2900.3059" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><SPAN class=528235110-24082007><FONT face=Arial
color=#0000ff size=2>You have to initialize ECL engine before calling ECL
functions. Use</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=528235110-24082007><FONT face=Arial
color=#0000ff size=2>cl_boot for this.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=528235110-24082007><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=528235110-24082007><FONT face=Arial
color=#0000ff size=2>Michael.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=528235110-24082007></SPAN> </DIV><BR>
<BLOCKQUOTE
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> ecls-list-bounces@lists.sourceforge.net
[mailto:ecls-list-bounces@lists.sourceforge.net] <B>On Behalf Of </B>Mark
Carter<BR><B>Sent:</B> Friday 24 August 2007 11:50<BR><B>To:</B> Mark Carter;
ecls-list@lists.sourceforge.net<BR><B>Subject:</B> Re: [Ecls-list] Getting
"hello world" going<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV
style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman,new york,times,serif">
<DIV
style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman,new york,times,serif">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-SIZE: 12pt; FONT-FAMILY: times new roman,new york,times,serif">-----
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-SIZE: 12pt; FONT-FAMILY: times new roman,new york,times,serif">
<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
href="http://uk.answers.yahoo.com/;_ylc=X3oDMTEydmViNG02BF9TAzIxMTQ3MTcxOTAEc2VjA21haWwEc2xrA3RhZ2xpbmU"
target=_blank rel=nofollow>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></BLOCKQUOTE></BODY></HTML>