Reference
Wolfram LibraryLink allows dynamic libraries to be directly loaded into the Mathematica kernel so that functions in the libraries can be immediately called from Mathematica. You can exchange not only C-like data types such as integers, reals, packed arrays, and strings, but also arbitrary Mathematica expressions. In addition, there are useful functions such as sending errors and calling back to Mathematica.
This section summarizes the functionality.
Mathematica Functions
This section summarizes the functions used to interact with Wolfram Libraries from Mathematica.
| LibraryFunctionLoad | load a function from a library |
| LibraryFunction | representation of a handle to a function loaded from a library |
| LibraryFunctionUnload | unload a function that was previously loaded from a library |
| LibraryUnload | unload all functions previously loaded from a library |
Mathematica functions for loading and unloading functions from Wolfram Libraries.
| LibraryFunctionInformation | returns information about a LibraryFunction |
Mathematica function for getting information about a function loaded from a Wolfram Library.
| $LibraryPath | the path used to find libraries |
| FindLibrary | find a library on the library path |
Mathematica functions for locating Wolfram Libraries.
| LibraryLoad | load a library without calling any functions |
Mathematica function for loading a library to resolve dependencies.
| $LibraryError | system-dependent errors from loading libraries |
| LibraryVersionInformation | rules containing information about the version of a library |
| LibraryVersionString | a string of library version information |
Mathematica functions in the LibraryLink` package.
Library Callback Functions
This section summarizes C language callback functions used to implement libraries.
| MTensor_new | create a new MTensor |
| MTensor_free | free an MTensor |
| MTensor_disown | allow a shared MTensor to be freed |
| MTensor_clone | copy an MTensor |
Callback functions for creating and freeing an MTensor.
| MTensor_getRank | get the rank of an MTensor |
| MTensor_getDimensions | get the dimensions of an MTensor |
| MTensor_getFlattenedLength | get the number of elements of an MTensor |
| MTensor_getType | get the type of an MTensor |
Mathematica functions for getting structural information from an MTensor.
| MTensor_getInteger | get an element from an MTensor of integers |
| MTensor_getReal | get an element from an MTensor of reals |
| MTensor_getComplex | get an element from an MTensor of complex numbers |
| MTensor_getMTensor | get an MTensor sub-part from an MTensor |
| MTensor_getIntegerData | get the data of an integer MTensor |
| MTensor_getRealData | get the data of a real MTensor |
| MTensor_getComplexData | get the data of a complex MTensor |
Mathematica functions for getting elements from an MTensor.
| MTensor_setInteger | set an element in an MTensor of integers |
| MTensor_setReal | set an element in an MTensor of reals |
| MTensor_setComplex | set an element in an MTensor of complex numbers |
| MTensor_setMTensor | set an MTensor subpart in an MTensor |
Mathematica functions for setting elements in an MTensor.
Mathematica functions for handling errors in library functions.
| UTF8String_disown | called when a string argument is no longer used |
Mathematica functions for working with strings.
| getMathLink | set the error handling buffer |
| processMathLink | send a message in Mathematica |
Mathematica functions for using MathLink in a library function.
