<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Arial,Helvetica,sans-serif;" dir="ltr">
<div>Hi,<br>
The wrapper example below works great.&nbsp; Seems like -DWITH_MAIN, and -DUSE_SND=0 adds some special help.&nbsp; Thanks so much for that info.<br>
<br>
I'm moving on also to look at cload.scm now, but confused about the s7 manual example compile lines which shows an &quot;ex1.c&quot;.&nbsp; I wasn't clear about what is ex1.c, or maybe my brain is just not reading the cload example correctly.<br>
<pre class="indented">gcc -c s7.c -I.
gcc -o ex1 ex1.c s7.o -lm -I. -ldl -Wl,-export-dynamic
ex1
&gt; (load &quot;cload.scm&quot;)<br>...</pre>
Regards,<br>
Jim<br>
-----------<br>
gcc -fpic -c add1.c<br>
gcc -shared -Wl,-soname,libadd1.so -o libadd1.so add1.o -lm -lc<br>
gcc s7.c -o repl -fpic -DWITH_MAIN -I. -ldl -lm -Wl,-export-dynamic -DUSE_SND=0<br>
<br>
&gt;./repl<br>
&nbsp;&nbsp; &gt; (load &quot;libadd1.so&quot; (inlet 'init_func 'add1_init))<br>
&nbsp;&nbsp; &gt; (add1 2)<br>
<br>
<br>
#include &lt;stdlib.h&gt;<br>
#include &quot;s7.h&quot;<br>
<br>
static s7_pointer add1(s7_scheme *sc, s7_pointer args)<br>
{<br>
&nbsp;&nbsp; if (s7_is_integer(s7_car(args)))<br>
&nbsp;&nbsp;&nbsp;&nbsp; return(s7_make_integer(sc, 1 &#43; s7_integer(s7_car(args))));<br>
&nbsp;&nbsp; return(s7_wrong_type_arg_error(sc, &quot;add1&quot;, 1, s7_car(args), &quot;an integer&quot;));<br>
&nbsp;&nbsp; }<br>
<br>
void add1_init(s7_scheme *sc);<br>
void add1_init(s7_scheme *sc)<br>
{<br>
&nbsp;&nbsp; s7_define_function(sc, &quot;add1&quot;, add1, 1, 0, false, &quot;(add1 int) adds 1 to int&quot;);<br>
&nbsp;&nbsp; }</div>
<br>
</div>
</body>
</html>