Calling Shared Libraries
- Updated2023-02-17
- 2 minute(s) read
Calling Shared Libraries
Define calls to a shared library to integrate external code into your application.
Create an SLI.
-
On the
Project Files tab, add an SLI to your project.
An SLI document appears in your project.
- In the SLI, click the ... button and select the shared library on disk.
-
Define the prototype for a function you want to call from the shared library.
A defined call to a function in an SLI is called an entry point.
- Click Add function.
-
On the
Item tab, select the function prototype symbol.
The entry point's name reflects the symbol you select.
- Click Add parameter.
- On the Item tab, specify the parameter name, data type, and behavior.
- Repeat step 3 to create as many entry points as you need for your project.
- Save the SLI.
Use the entry points in any application in your project.
- Open the VI in which you want to call the shared library.
-
On the diagram palette, click .
Click the SLI folder to show every entry point you defined in that SLI.
- Drop the entry points you want to use on the diagram.
- Wire the entry points and complete the diagram.
-
Run the VI.
Input data passes from the diagram to the external code, and data returns from the external code to the diagram.