LoadCompiledComponent

LoadCompiledComponent[comp]

loads a compiled component comp.

LoadCompiledComponent[comp,target]

loads a compiled component comp from the target location.

Details

  • Compiled components can be used to represent a named group of compiler declarations.
  • Compiled components can be used to represent compiled functionality that can be built into a shared library.
  • Compiled components can be embedded in paclets.
  • comp can be given as a CompiledComponent object or a string with the name of a compiled component.
  • Typically, loading a compiled component involves loading a shared library created with BuildCompiledComponent.
  • If no target location is given, then FindLibrary is used to find a library with the same name as the target component.
  • The "ExternalLibraries" setting of DeclareCompiledComponent gives external libraries that are loaded before the component library is loaded.
  • The "LoadingEpilogs" setting of DeclareCompiledComponent gives functions to be executed after the component library is loaded.
  • Calling an installed function from an unloaded component will attempt to automatically load the component, failing if no build exists.
  • The following option can be given:
  • CompilerEnvironmentAutomatica compiler environment, which by default includes the declarations in the component, passed to functions set by "LoadingEpilogs"

Examples

open allclose all

Basic Examples  (1)

Create a compiled component:

Build the component:

Load the component:

Call the function included in the built component:

Scope  (1)

Declare a list of declarations in a component:

Declare a library function:

Declare an installed function:

Use an installed function to automatically load the build:

Explicitly load the component to access the built library function:

Wolfram Research (2022), LoadCompiledComponent, Wolfram Language function, https://reference.wolfram.com/language/ref/LoadCompiledComponent.html.

Text

Wolfram Research (2022), LoadCompiledComponent, Wolfram Language function, https://reference.wolfram.com/language/ref/LoadCompiledComponent.html.

CMS

Wolfram Language. 2022. "LoadCompiledComponent." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/LoadCompiledComponent.html.

APA

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

BibTeX

@misc{reference.wolfram_2024_loadcompiledcomponent, author="Wolfram Research", title="{LoadCompiledComponent}", year="2022", howpublished="\url{https://reference.wolfram.com/language/ref/LoadCompiledComponent.html}", note=[Accessed: 21-December-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_loadcompiledcomponent, organization={Wolfram Research}, title={LoadCompiledComponent}, year={2022}, url={https://reference.wolfram.com/language/ref/LoadCompiledComponent.html}, note=[Accessed: 21-December-2024 ]}