Create a Shared Library

The Wolfram Compiler can create shared libraries from the functions it compiles. Functions can be loaded into the Wolfram Engine at a subsequent time, eliminating the need to compile the function during each session, or linked into standalone programs.

FunctionCompileExportLibrary compiles and links a shared library.

In[1]:=1
Out[1]=1

The library can be loaded with LibraryFunctionLoad to return a CompiledCodeFunction.

In[2]:=2
Out[2]=2

The compiled code can be used just as though it were made with FunctionCompile.

In[3]:=3
Out[3]=3

Related Examples