[plt-scheme] libmzgc.a, libmzscheme.a on Mac OS X?

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Fri Apr 2 10:55:08 EST 2004

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:


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


Posted on the users mailing list.