[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: mzc -cc
Quoting Jonathan Berry:
> Are the following equivalent:
>
> mzc -cc tree.cxx
> mzc --linker /usr/bin/g++ --ld tree.so tree.o
>
> and:
>
> g++ -c -I $(PLTINCLUDE) tree.cxx
> mzc --linker /usr/bin/g++ --ld tree.so tree.o
>
> where PLTINCLUDE is the directory containing escheme.h?
For most Unix platforms and configurations, that's essentially right.
mzc actually uses gcc instead of g++, and throws in a -O2.
In general, you can run mzc with -v to see the commands that it
executes.
> the tree.cxx example isn't
> loading (the hello.c example works):
> [...]
> Welcome to MzScheme version 102, Copyright (c) 1995-2000 PLT (Matthew Flatt)
> > (define tree% (load-extension "tree.so"))
> > (define o (make-object tree% 10))
> make-object: expects type <class> as 1st argument, given: #<void>;
> other arguments were: 10
The loading line should be
> (load-extension "tree.so")
without the `(define tree%'.
At some point, I changed the extension to bind `tree%' instead of
returning a class. Let me know if I forgot to update the usage
instructions somewhere, or if some instructions are unclear.
Thanks,
Matthew
- References:
- mzc -cc
- From: Jonathan Berry <berryj@elon.edu>