<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; "><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" face="Courier" size="2"><SPAN class="Apple-style-span" style="font-size: 9.7px;">With mzscheme, by using swig I could generate function 'fact' and use</SPAN></FONT><FONT class="Apple-style-span" face="Courier" size="2"><SPAN class="Apple-style-span" style="font-size: 9.7px;"> </SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" face="Courier" size="2"><SPAN class="Apple-style-span" style="font-size: 9.7px;">it.</SPAN></FONT><FONT class="Apple-style-span" face="Courier" size="2"><SPAN class="Apple-style-span" style="font-size: 9.7px;"> </SPAN></FONT></DIV><P style="margin: 0.0px 0.0px 9.0px 0.0px"><FONT class="Apple-style-span" face="Courier" size="2"><SPAN class="Apple-style-span" style="font-size: 9.7px;">(load-extension "example.dylib") </SPAN></FONT><FONT class="Apple-style-span" face="Courier" size="2"><SPAN class="Apple-style-span" style="font-size: 9.7px;"><BR></SPAN></FONT><FONT class="Apple-style-span" face="Courier" size="2"><SPAN class="Apple-style-span" style="font-size: 9.7px;"> (display (fact 3))</SPAN></FONT><FONT class="Apple-style-span" face="Courier" size="2"><SPAN class="Apple-style-span" style="font-size: 9.7px;"> </SPAN></FONT></P><P style="margin: 0.0px 0.0px 9.0px 0.0px"><FONT class="Apple-style-span" face="Courier" size="2"><SPAN class="Apple-style-span" style="font-size: 9.7px;">In order to generate standalone app, I had to use module.</SPAN></FONT><FONT class="Apple-style-span" face="Courier" size="2"><SPAN class="Apple-style-span" style="font-size: 9.7px;"> </SPAN></FONT></P><P style="margin: 0.0px 0.0px 9.0px 0.0px"><FONT class="Apple-style-span" face="Courier" size="2"><SPAN class="Apple-style-span" style="font-size: 9.7px;">(module testit mzscheme </SPAN></FONT><FONT class="Apple-style-span" face="Courier" size="2"><SPAN class="Apple-style-span" style="font-size: 9.7px;"><BR></SPAN></FONT><FONT class="Apple-style-span" face="Courier" size="2"><SPAN class="Apple-style-span" style="font-size: 9.7px;"> (load-extension "example.dylib") </SPAN></FONT><FONT class="Apple-style-span" face="Courier" size="2"><SPAN class="Apple-style-span" style="font-size: 9.7px;"><BR></SPAN></FONT><FONT class="Apple-style-span" face="Courier" size="2"><SPAN class="Apple-style-span" style="font-size: 9.7px;"> (display (fact 3)) </SPAN></FONT><FONT class="Apple-style-span" face="Courier" size="2"><SPAN class="Apple-style-span" style="font-size: 9.7px;"><BR></SPAN></FONT><FONT class="Apple-style-span" face="Courier" size="2"><SPAN class="Apple-style-span" style="font-size: 9.7px;"> )</SPAN></FONT><FONT class="Apple-style-span" face="Courier" size="2"><SPAN class="Apple-style-span" style="font-size: 9.7px;"> </SPAN></FONT></P><P style="margin: 0.0px 0.0px 13.0px 0.0px"><FONT class="Apple-style-span" face="Courier" size="2"><SPAN class="Apple-style-span" style="font-size: 9.7px;">But I got "compile: unbound variable in module in: fact". </SPAN></FONT><FONT class="Apple-style-span" face="Courier" size="2"><SPAN class="Apple-style-span" style="font-size: 9.7px;"></SPAN></FONT></P><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" face="Courier" size="2"><SPAN class="Apple-style-span" style="font-size: 9.7px;">I tried to copy the example.dylib to the "specific" directory by</SPAN></FONT><FONT class="Apple-style-span" face="Courier" size="2"><SPAN class="Apple-style-span" style="font-size: 9.7px;"> </SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" face="Courier" size="2"><SPAN class="Apple-style-span" style="font-size: 9.7px;">following the advice at</SPAN></FONT><FONT class="Apple-style-span" face="Courier" size="2"><SPAN class="Apple-style-span" style="font-size: 9.7px;"> </SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><A href="http://list.cs.brown.edu/pipermail/plt-scheme/2002-August/000372.html"><FONT class="Apple-style-span" face="Courier" size="2"><SPAN class="Apple-style-span" style="font-size: 9.7px;">http://list.cs.brown.edu/pipermail/plt-scheme/2002-August/000372.html</SPAN></FONT></A><FONT class="Apple-style-span" face="Courier" size="2"><SPAN class="Apple-style-span" style="font-size: 9.7px;"> </SPAN></FONT></DIV><P style="margin: 0.0px 0.0px 9.0px 0.0px; font: 9.7px Courier; min-height: 11.0px"><BR></P><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 9.7px/normal Courier; min-height: 11px; ">>>>>>>>>>>>>>>>>><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" face="Courier" size="2"><SPAN class="Apple-style-span" style="font-size: 9.7px;">Once you've made that change put x.so in</SPAN></FONT><FONT class="Apple-style-span" face="Courier" size="2"><SPAN class="Apple-style-span" style="font-size: 9.7px;"> </SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" face="Courier" size="2"><SPAN class="Apple-style-span" style="font-size: 9.7px;">the directory given by</SPAN></FONT><FONT class="Apple-style-span" face="Courier" size="2"><SPAN class="Apple-style-span" style="font-size: 9.7px;"> </SPAN></FONT></DIV><P style="margin: 0.0px 0.0px 9.0px 0.0px"><FONT class="Apple-style-span" face="Courier" size="2"><SPAN class="Apple-style-span" style="font-size: 9.7px;"> (build-path dir "compiled" "native" </SPAN></FONT><FONT class="Apple-style-span" face="Courier" size="2"><SPAN class="Apple-style-span" style="font-size: 9.7px;"><BR></SPAN></FONT><FONT class="Apple-style-span" face="Courier" size="2"><SPAN class="Apple-style-span" style="font-size: 9.7px;"> (system-library-subpath)) </SPAN></FONT><FONT class="Apple-style-span" face="Courier" size="2"><SPAN class="Apple-style-span" style="font-size: 9.7px;"><BR></SPAN></FONT><FONT class="Apple-style-span" face="Courier" size="2"><SPAN class="Apple-style-span" style="font-size: 9.7px;"> <<<<<<<<<<<<<<<<<</SPAN></FONT><FONT class="Apple-style-span" face="Courier" size="2"><SPAN class="Apple-style-span" style="font-size: 9.7px;"> </SPAN></FONT></P><P style="margin: 0.0px 0.0px 9.0px 0.0px"><FONT class="Apple-style-span" face="Courier" size="2"><SPAN class="Apple-style-span" style="font-size: 9.7px;">But the result of mzsheme is. </SPAN></FONT><FONT class="Apple-style-span" face="Courier" size="2"><SPAN class="Apple-style-span" style="font-size: 9.7px;"><BR></SPAN></FONT><FONT class="Apple-style-span" face="Courier" size="2"><SPAN class="Apple-style-span" style="font-size: 9.7px;"> --------------------------------------------</SPAN></FONT><FONT class="Apple-style-span" face="Courier" size="2"><SPAN class="Apple-style-span" style="font-size: 9.7px;"> </SPAN></FONT></P><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" face="Courier" size="2"><SPAN class="Apple-style-span" style="font-size: 9.7px;">> (build-path dir "compiled" "native" (system-library-subpath))</SPAN></FONT><FONT class="Apple-style-span" face="Courier" size="2"><SPAN class="Apple-style-span" style="font-size: 9.7px;"> </SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 9.7px/normal Courier; min-height: 11px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" face="Courier" size="2"><SPAN class="Apple-style-span" style="font-size: 9.7px;">reference to undefined identifier: dir</SPAN></FONT><FONT class="Apple-style-span" face="Courier" size="2"><SPAN class="Apple-style-span" style="font-size: 9.7px;"> </SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" face="Courier" size="2"><SPAN class="Apple-style-span" style="font-size: 9.7px;">---------------------------------------------</SPAN></FONT><FONT class="Apple-style-span" face="Courier" size="2"><SPAN class="Apple-style-span" style="font-size: 9.7px;"> </SPAN></FONT></DIV><P style="margin: 0.0px 0.0px 9.0px 0.0px"><FONT class="Apple-style-span" face="Courier" size="2"><SPAN class="Apple-style-span" style="font-size: 9.7px;">So, I don't know where to copy the .dylib file.</SPAN></FONT><FONT class="Apple-style-span" face="Courier" size="2"><SPAN class="Apple-style-span" style="font-size: 9.7px;"> </SPAN></FONT></P><P style="margin: 0.0px 0.0px 13.0px 0.0px"><FONT class="Apple-style-span" face="Courier" size="2"><SPAN class="Apple-style-span" style="font-size: 9.7px;">What might be wrong?</SPAN></FONT><FONT class="Apple-style-span" face="Courier" size="2"><SPAN class="Apple-style-span" style="font-size: 9.7px;"> </SPAN></FONT></P><P style="margin: 0.0px 0.0px 13.0px 0.0px"><FONT class="Apple-style-span" face="Courier" size="2"><SPAN class="Apple-style-span" style="font-size: 9.7px;">Thanks.</SPAN></FONT></P></BODY></HTML>