|Download Help (Windows Only)|
To call a shared library with the Call Library Function Node, you must specify either the name of the shared library or the path to the shared library on disk. However, these two techniques produce different consequences when you distribute or relocate your VIs and applications. Use the following table to determine which technique addresses your particular use case.
|Technique for Specifying Location||Relevant use cases||Basis of Search Algorithm||Effects on Distribution|
|By name||The shared library is in the system search path. Common examples include system shared libraries, such as kernel32.dll, and third party shared libraries designed for componentized reuse.||System search algorithm||LabVIEW does not include the shared library automatically in build specifications.|
|By path||The shared library is private to your VI. Common examples include shared libraries that you wrote specifically for a particular VI.||The path you specify||LabVIEW automatically includes the shared library in build specifications.|
To specify the location of a shared library, you can enter the name or path in the Library name or path text box of the Call Library Function dialog box. You can also wire the name or path to the path in input of the Call Library Function Node.
|Caution Do not specify the location of a system shared library, such as kernel32.dll, by path. Because LabVIEW automatically includes by-path shared libraries in build specifications, you might distribute a system shared library to another computer inadvertently. Redistributing some shared libraries, such as kernel32.dll, might cause the target computer to crash. Therefore, always specify system shared libraries by name.|
If LabVIEW cannot locate a shared library by name, consider the following possible causes:
If LabVIEW cannot locate a shared library by path, consider the following possible causes:
If LabVIEW cannot locate a shared library that you specified either by name or by path, LabVIEW searches the VI search path for the missing shared library. If LabVIEW finds the shared library, it updates the path to the shared library within the Call Library Function dialog box.
Searching for missing shared libraries requires extra time, displays an unavoidable search dialog box, and causes unsaved changes in the calling VI that you must save yourself. Therefore, configure VIs with the correct name or path information for shared libraries whenever possible.
|Note You can configure stand-alone applications to search for shared libraries in specific locations on a target computer by using a .ini file. Refer to the KnowledgeBase at ni.com for more information about using a .ini file to help a stand-alone application locate a shared library.|