FunctionCompileExportLibrary

FunctionCompileExportLibrary[file,fspec]

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)

Export a compiled version of a function into a library:

Load the library and create a CompiledCodeFunction:

Execute the function in the CompiledCodeFunction:

The file can be an absolute path:

Several functions can be compiled with FunctionCompileExportLibrary:

Loading the library creates a list of compiled code functions:

Execute the code that was loaded:

Several functions can be compiled with FunctionCompileExportLibrary:

Loading the library creates a list of compiled code functions:

Execute the code that was loaded:

Auxiliary definitions can be given with FunctionDeclaration:

Load and execute code in the library:

Options  (1)

CompilerEnvironment  (1)

Create a compiler environment and add a function definition:

Use a compiler environment in a compilation:

Loading the library creates a CompiledCodeFunction:

Execute the code that was loaded:

Possible Issues  (1)

Destination Problems  (1)

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

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).

CMS

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

BibTeX

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

BibLaTeX

@online{reference.wolfram_2023_functioncompileexportlibrary, organization={Wolfram Research}, title={FunctionCompileExportLibrary}, year={2021}, url={https://reference.wolfram.com/language/ref/FunctionCompileExportLibrary.html}, note=[Accessed: 28-March-2024 ]}