[plt-scheme] Embedding MzScheme on Mac OS X

From: Jens Axel Søgaard (jensaxel at soegaard.net)
Date: Mon Jul 13 13:13:40 EDT 2009

2009/7/13 Jens Axel Søgaard <jensaxel at soegaard.net>

Now for the correct options for 3m. I am missing a library, when I link.
>
...

>
> jas$ ld  -L./pltcur/lib/ -lmzscheme3m    -F./pltcur/lib/ -framework
> PLT_MzScheme   embedded_3m.o
> Undefined symbols:
>   "___maskrune", referenced from:
>       _scheme_do_format in libmzscheme3m.a(string.o)
> ...
>


Changing the order of the switches and let gcc take care of the linking does
the trick:

gcc   -L./pltcur/lib/    -I./pltcur/include/   -F./pltcur/lib/   -framework
PLT_MzScheme -lmzscheme3m    embedded.3m.c

Here mzc -x produces embedded.3m.c.

For the direct 3m example in the docs I had to add
    #define MZ_PRECISE_GC 1
as the first line before I got it working.

I know the documentation needs to cater Windows, Linux and OS X, and thus
including examples of compilation might be a little verbose - but perhaps
they could be put in a footnote or an appendix?

For non-C hackers it takes a while to find the right gcc incantation.
-- 
Jens Axel Søgaard
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20090713/ea3d0c04/attachment.html>

Posted on the users mailing list.