({{, (RefLink[FunctionCompileExportLibrary, paclet:ref/FunctionCompileExportLibrary])[file,func] 
exports a compiled version of func as a shared library suitable for external use.}})

OpenersNotesSection(Spacer1)Details and Options

(RefLink[FunctionCompileExportLibrary, paclet:ref/FunctionCompileExportLibrary]) generates a library suitable for use on the type of computer on which it is run.

The following library types are generated on different types of systems:

(RefLink[FunctionCompileExportLibrary, paclet:ref/FunctionCompileExportLibrary]) has the option (RefLink[CompilerOptions, paclet:ref/CompilerOptions]), which allows detailed options to be passed to different parts of the compilation pipeline.

The library generated by (RefLink[FunctionCompileExportLibrary, paclet:ref/FunctionCompileExportLibrary]) is suitable for linking into external programs. It can also be loaded into the Wolfram System using (RefLink[LibraryFunctionLoad, paclet:ref/LibraryFunctionLoad]).

OpenersPrimaryExamplesSection(Spacer1)Examples  (1)

OpenersExampleSection0(Spacer1)Basic Examples  (1)

Export a compiled version of a function into a library:

lib=FunctionCompileExportLibrary["function.dylib",Function[Typed[arg,"MachineInteger"],arg+1]]

Load the library and create a (RefLink[CompiledCodeFunction, paclet:ref/CompiledCodeFunction]):

fun=LibraryFunctionLoad[lib]

Execute the function in the (RefLink[CompiledCodeFunction, paclet:ref/CompiledCodeFunction]):

fun[10]

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(RefLink[FunctionCompile, paclet:ref/FunctionCompile])  ▪  (RefLink[FunctionCompileExport, paclet:ref/FunctionCompileExport])  ▪  (RefLink[FunctionCompileExportString, paclet:ref/FunctionCompileExportString])  ▪  (RefLink[FunctionCompileExportByteArray, paclet:ref/FunctionCompileExportByteArray])  ▪  (RefLink[LibraryFunctionLoad, paclet:ref/LibraryFunctionLoad])}})}})

({{DocumentationFooterIconsRelatedGuide.png, ({{Related Guides}, {▪(RefLinkPlain[External Language Interfaces, paclet:guide/ExternalLanguageInterfaces])}, {▪(RefLinkPlain[Code Compilation, paclet:guide/CodeCompilation])}})}})