Wolfram Language & System 10.3 (2015)|Legacy Documentation

This is documentation for an earlier version of the Wolfram Language.View current documentation (Version 11.2)

Installable WSTP Programs

The Wolfram Language provides a convenient way to call functions in external C and other programs. With a .tm template specifying Wolfram Language functions corresponding to each C function, you build a WSTP-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 Wolfram Language expressions.


Install load a WSTP installable executable to call from your Wolfram System session

Uninstall close down a WSTP executable, removing its Wolfram Language functions

LinkPatterns find functions available in a running WSTP program

., tm template file for connecting C and Wolfram Language functions

mprep preprocess .tm files to generate compiled C programs (Windows)

mcc complete command-line script for building WSTP programs (Unix, Mac OS X)

C Language Functions »

WSMain() special version of main() for WSTP-installable C programs

WSEvaluate(), WSEvaluateString() call back from C into the Wolfram Language

WSPutFunction(), WSGetFunction(), ... exchange arbitrary structures