({{, mathlink.h  
MathLink header file.}})

OpenersNotesSection(Spacer1)Details

MathLink C functions are declared in the file mathlink.h, which should be included in the source code for any MathLink-compatible program.

Unless you specify #define MLPROTOTYPES 0 before #include "mathlink.h", the MathLink functions will be included with standard C prototypes.

The following special types are defined in mathlink.h:

The following constants are set up when a MathLink template file is processed:

All functions defined in mathlink.h are C language functions. They can be called from other languages with appropriate wrappers.

All functions defined in mathlink.h that return int yield a nonzero value if they succeed; otherwise they return 0 and have no effect.

In a program set up using MathLink templates (.tm files), the link to the Wolfram System is called (NonWLLink[stdlink, paclet:ref/c/stdlink]).

All functions defined in mathlink.h that put data to a link do not deallocate memory used to store the data. Functions that get data from a link may allocate memory to store the data. Functions that get data from a link will not return until the necessary data becomes available. A yield function can be registered to be called during the wait.

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {  ▪  }, {Related Programs:  (RefLink[mcc, paclet:ref/program/mcc])}, {Related System Files:  (RefLink[file.tm, paclet:ref/file/file.tm])}})}})