The
Mathematica system provides a convenient way to call functions in external C and other programs. With a
.tm template specifying
Mathematica functions corresponding to each C function, you build a
MathLink-installable binary using
mprep or
mcc. You can exchange not only C-like data types such as integers, reals, arrays and strings, but also arbitrary
Mathematica expressions.
Install — load a
MathLink installable executable to call from your
Mathematica session
LinkPatterns — find functions available in a running
MathLink program
.tm — template file for connecting C and
Mathematica functions
mprep — preprocess
.tm files to generate compiled C programs (Windows)
mcc — complete command-line script for building
MathLink programs (Unix, Mac OS X)
MLPutFunction(),
MLGetFunction(),
... — exchange arbitrary structures