mcc

The program mcc has been replaced with wscc.

MathLink template file compiler.

Details

  • is a C and C++ compiling command for creating a program for installation into the Wolfram Language with the Wolfram Language command Install. The installed program communicates with the Wolfram Language by using the MathLink protocol. The command should have a MathLink template file as one of its file arguments along with ordinary C and C++ source files and object files, which encode the functions that are to be installed into the Wolfram Language. The MathLink template filename should bear a .tm suffix.
  • The script first passes the template file to the Wolfram System utility mprep, which preprocesses it into a C file that uses MathLink library functions. It then invokes the compiler identified by the environment variable to compile and link this C file along with the other files, arguments, and the MathLink library. The mcc script checks the environment variable CXX for compiling C++ files.
  • On operating systems that support multiple binary formats, automatically links with the appropriate library.
  • passes all defined options through to the C compiler, but it also treats the following options specially:
  • -gkeep the C file generated by mprep and pass the -g option to the C compiler to generate a symbol table for debugging
    -Epass the .tm files through mprep, then run the C source files through the C compiler only, sending output to stdout
    -Ppass the .tm files through mprep, then run the C source files through the C compiler only, writing the output to a file with a .i suffix
    -xo namewrite the output file in name/$SystemID/name, to be located by Install["name"]
    -stlink with the static MathLink library; on Mac OS X mcc only links with the static library
    -b32override automatic binary format selection to generate a 32-bit binary
    -b64override automatic binary format selection to generate a 64-bit binary
    -b32_64override automatic binary format selection to generate a binary with both 32-bit and 64-bit architectures on Mac OS X
    -ndirect mcc to generate a binary on Mac OS X that contains only the default binary type; compilers on Mac OS X currently generate 32-bit ppc or i386 architectures by default
    --versionprint the version of mcc to stdout
    --helpprint a help message for mcc to stdout