# lib_load (MathScript RT Module Function)

LabVIEW 2012 MathScript RT Module Help

Edition Date: June 2012

Part Number: 373123C-01

»View Product Info

Owning Class: libraries

Requires: MathScript RT Module (Windows)

## Syntax

Legacy Name: `loadlibrary`

## Description

Loads a shared library. After you load the shared library, you can use the lib_call function to call a function from the shared library.

Details

Examples

## Inputs

Name Description
libname Specifies the name of the shared library you want to load. If you do not specify a file extension, LabVIEW assumes .dll. libname is a string.
headername Specifies the name of the header file. If you do not specify a file extension, LabVIEW assumes .h. headername is a string.
options Specifies additional options. You can list the options in any order, as long as you list the option value immediately after the corresponding option. For example, alias value always must follow 'alias'. options accepts a combination of the following values.

 'alias' Specifies that you want to assign another name to the shared library. If you specify an alias, always use the alias to refer to the shared library. alias value Specifies the alias name you want to assign to the shared library. alias value is a string. 'addheader' Specifies that you want to refer to an additional header file. addheader value Specifies the name of the additional header file. addheader value is a string. 'includepath' Specifies that you want LabVIEW to search in an additional path. LabVIEW searches the working directory and the MathScript search path by default. Use the MathScript page of the Options dialog box or the MathScript: Search Paths page of the LabVIEW MathScript Properties dialog box to change the default working directory and the default search path list. includepath value Specifies the additional path you want LabVIEW to search. includepath value is a string.

## Details

Refer to the MathScript Shared Libraries.lvproj in the labview\examples\MathScript\MathScript Shared Libraries directory for examples of calling shared libraries from MathScript.

The following table lists the support characteristics of this function.

 Supported in the LabVIEW Run-Time Engine Yes Supported on RT targets Yes Suitable for bounded execution times on RT Not characterized

## Examples

r = [labviewroot '\examples\MathScript\MathScript Shared Libraries']
lib_load('myDemo', 'demo', 'alias', 'myD', 'includepath', r)