[plt-scheme] libmzgc.a, libmzscheme.a on Mac OS X?
At Thu, 1 Apr 2004 05:39:06 -0500, Michael Manti wrote:
> I'm trying to compile Sergey Khorev's MzVim, but gcc complains that
> libmzgc.a and libmzscheme.a are unavailable. I see that they are not in
> /Applications/PLT Scheme v206/lib subdirectory, but mzdyn.o is. (I used
> the Mac OS X installer for DrScheme.)
>
> Do I need to download and compile the source? Which flags do I need to
> set? Any help would be greatly appreciated; I can't find any hints on
> the web.
Under Mac OS X, an alternative to libmzscheme.a and libmzgc.a is the
"framework" PLT_MzScheme, which provides a dynamic library.
You probably have the framework installed in the normal location:
/Library/Frameworks/PLT_MzScheme.framework
To use the framework, instead of linking with -lmzscheme -lmzgc, link
with -framework PLT_MzScheme.
For example, if "ex.c" has main() for an embedding program:
gcc -I/Applications/PLT\ Scheme\ v206p1/include/
-framework PLT_MzScheme
ex.c -o ex
should compile and link (if your include files are in the usual place).
The content of "Applications/PLT\ Scheme\ v206p1/include/" really
should be put in the framework, too, since that's what frameworks are
for. After we fix this (one day), then compiling and linking will be as
simple as
gcc -framework PLT_Mzscheme ex.c -o ex
Matthew