2009/7/13 Matthew Flatt <span dir="ltr"><<a href="mailto:mflatt@cs.utah.edu">mflatt@cs.utah.edu</a>></span><br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">At Sun, 12 Jul 2009 23:44:30 +0200, Jens Axel Søgaard wrote:<br>
> Hopefully I have missed something obvious - but what?<br>
<br>
</div>The Mac frameworks are set up for 3m linking, but I think you mean to<br>
use the CGC frameworks.</blockquote><div><br></div><div>Actually, I started with CGC because the manual said:</div><div><br></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif"> > the embedding process for PLT Scheme CGC or PLT Scheme 3m is </font></div>
<div><font class="Apple-style-span" face="arial, helvetica, sans-serif"> > essentially the same, but the process for PLT Scheme 3m is most </font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif"> > easily understood as a variant of the process for PLT Scheme CGC.</font></div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
The simplest solution is to redirect the "PLT_MzScheme" soft link<br>
within "PLT_MzScheme.framework" to the non-"_3m" version, instead of<br>
the "_3m" version.<br>
</blockquote></div><br>That did the trick:<div><br></div><div><div>jas$ PLT_MzScheme.framework jensaxelsoegaard$ pwd</div><div>/Applications/PLT Scheme Full v4.2.0.2/lib/PLT_MzScheme.framework</div><div><br></div><div><div>
jas$ PLT_MzScheme.framework jensaxelsoegaard$ ln -s Versions/<a href="http://4.2.0.2/PLT_MzScheme">4.2.0.2/PLT_MzScheme</a> .</div><div><br></div></div><div>jas$ gcc -L./pltcur/lib/ -I./pltcur/include/ -F./pltcur/lib/ -framework PLT_MzScheme -lmzscheme -lmzgc embedded.c</div>
<div><br></div><div>jas$ ./a.out 1</div><div>1</div><div><br></div><div><br></div><div>Now for the correct options for 3m. I am missing a library, when I link.</div><div><br></div><div>First I changed the symbolic link in the framework back to the original.</div>
<div>Then using the same embedded.c file as before, I did:</div><div><br></div><div><div>jas$ ./pltcur/bin/mzc --3m --c-mods modules.c ++lib scheme/base </div><div><br></div><div>jas$ ./pltcur/bin/mzc --3m -x embedded.c</div>
<div><br></div><div>jas$ gcc -L./pltcur/lib/ -I./pltcur/include/ -F./pltcur/lib/ -framework PLT_MzScheme -lmzscheme3m embedded.3m.c</div><div><br></div><div>jas$ ld -L./pltcur/lib/ -lmzscheme3m -F./pltcur/lib/ -framework PLT_MzScheme embedded_3m.o </div>
<div>Undefined symbols:</div><div> "___maskrune", referenced from:</div><div> _scheme_do_format in libmzscheme3m.a(string.o)</div><div> _system_type in libmzscheme3m.a(string.o)</div><div> _scheme_symbol_name_and_size in libmzscheme3m.a(symbol.o)</div>
<div> _scheme_symbol_name_and_size in libmzscheme3m.a(symbol.o)</div><div> _check_dos_slashslash_qm in libmzscheme3m.a(file.o)</div><div> _check_dos_slashslash_qm in libmzscheme3m.a(file.o)</div><div> _is_special_filename in libmzscheme3m.a(file.o)</div>
<div>...</div></div><div><br></div>-- <br>Jens Axel Søgaard<br><br><br>
</div>