WOLFRAM

exports a compiled version of function specification fspec as a shared library suitable for external use.

FunctionCompileExportLibrary[file,defs,fspec]

uses the auxiliary definitions defs for compilation.

Details and Options

Examples

open allclose all

Basic Examples  (4)Summary of the most common use cases

Export a compiled version of a function into a library:

Out[1]=1

Load the library and create a CompiledCodeFunction:

Out[2]=2

Execute the function in the CompiledCodeFunction:

Out[3]=3

The file can be an absolute path:

Out[4]=4

Several functions can be compiled with FunctionCompileExportLibrary:

Loading the library creates a list of compiled code functions:

Out[2]=2

Execute the code that was loaded:

Out[3]=3

Several functions can be compiled with FunctionCompileExportLibrary:

Loading the library creates a list of compiled code functions:

Out[2]=2

Execute the code that was loaded:

Out[3]=3

Auxiliary definitions can be given with FunctionDeclaration:

Load and execute code in the library:

Out[2]=2

Options  (2)Common values & functionality for each option

CompilerEnvironment  (1)

Create a compiler environment and add a function definition:

Use a compiler environment in a compilation:

Loading the library creates a CompiledCodeFunction:

Out[3]=3

Execute the code that was loaded:

Out[4]=4

ProgressReporting  (1)

Progress during a compilation is reported:

This can be suppressed by setting the option ProgressReporting to False.

The default value of ProgressReporting is Automatic, which means that the global setting $ProgressReporting is used. If this is set to False, then no progress reporting takes place.

Possible Issues  (1)Common pitfalls and unexpected behavior

Destination Problems  (1)

If an output path is chosen that does not exist or for which there is no permission, an error occurs:

Out[1]=1
Wolfram Research (2019), FunctionCompileExportLibrary, Wolfram Language function, https://reference.wolfram.com/language/ref/FunctionCompileExportLibrary.html (updated 2021).
Wolfram Research (2019), FunctionCompileExportLibrary, Wolfram Language function, https://reference.wolfram.com/language/ref/FunctionCompileExportLibrary.html (updated 2021).

Text

Wolfram Research (2019), FunctionCompileExportLibrary, Wolfram Language function, https://reference.wolfram.com/language/ref/FunctionCompileExportLibrary.html (updated 2021).

Wolfram Research (2019), FunctionCompileExportLibrary, Wolfram Language function, https://reference.wolfram.com/language/ref/FunctionCompileExportLibrary.html (updated 2021).

CMS

Wolfram Language. 2019. "FunctionCompileExportLibrary." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2021. https://reference.wolfram.com/language/ref/FunctionCompileExportLibrary.html.

Wolfram Language. 2019. "FunctionCompileExportLibrary." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2021. https://reference.wolfram.com/language/ref/FunctionCompileExportLibrary.html.

APA

Wolfram Language. (2019). FunctionCompileExportLibrary. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/FunctionCompileExportLibrary.html

Wolfram Language. (2019). FunctionCompileExportLibrary. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/FunctionCompileExportLibrary.html

BibTeX

@misc{reference.wolfram_2025_functioncompileexportlibrary, author="Wolfram Research", title="{FunctionCompileExportLibrary}", year="2021", howpublished="\url{https://reference.wolfram.com/language/ref/FunctionCompileExportLibrary.html}", note=[Accessed: 29-May-2025 ]}

@misc{reference.wolfram_2025_functioncompileexportlibrary, author="Wolfram Research", title="{FunctionCompileExportLibrary}", year="2021", howpublished="\url{https://reference.wolfram.com/language/ref/FunctionCompileExportLibrary.html}", note=[Accessed: 29-May-2025 ]}

BibLaTeX

@online{reference.wolfram_2025_functioncompileexportlibrary, organization={Wolfram Research}, title={FunctionCompileExportLibrary}, year={2021}, url={https://reference.wolfram.com/language/ref/FunctionCompileExportLibrary.html}, note=[Accessed: 29-May-2025 ]}

@online{reference.wolfram_2025_functioncompileexportlibrary, organization={Wolfram Research}, title={FunctionCompileExportLibrary}, year={2021}, url={https://reference.wolfram.com/language/ref/FunctionCompileExportLibrary.html}, note=[Accessed: 29-May-2025 ]}