[previous] [up] [next]     [contents] [index]
Next: Prefixing Compilation with Macro Up: PLT mzc: MzScheme Compiler Previous: Macros and Signatures in

Compiling Individual Files with mzc

To compile an individual file with mzc, provide the file name as the command line argument to mzc. To compile to byte code, use the -z or --zo flag; to compile to native code, use the -e or --extension flag.

The input file must have a file extension that designates it as a Scheme file, either .ss or .scm. The output file will have the same base name and same directory (by default) as the input file, but with an extension approrpiate to the type of the output file (either .zo, .dll, or .so).

For example:

  mzc --extension file.ss
Under Windows, the above command reads file.ss from the current directory and produces file.dll in the current directory.

Multiple Scheme files can be specified for compilation at once. A separate compiled file is produced for each Scheme file. By default, each compiled file is placed in the directory containing the corresponding input file. When multiple files are compiled at once, macros defined in a file are visible in the files that are compiled afterwards.





PLT