![]() | In This Topic | ![]() | |||||||||||||||||
|
This section describes the tasks necessary to complete the Array Average VI you started building in Building a Shared Library to Call from LabVIEW so the VI can call the avg_num function in myshared.dll.
![]() |
Note�� (Linux) The shared library file has a .so extension. You cannot call functions in static libraries (.a files) on Linux. You can only call shared libraries (.so files) dynamically. |
You must complete the following tasks before the Array Average VI can call the avg_num function in myshared.dll.
![]() |
Note��If you want to run applications or shared libraries created with different versions of LabVIEW on the same computer, the computer must have a version of the LabVIEW Run-Time Engine that is compatible with each version of LabVIEW used to create the applications or shared libraries. |
Complete the following steps to complete the configuration of the Call Library Function Node.
![]() |
Note��To make the reference platform independent, use the * wildcard. Keep the C++ compiler from introducing platform dependence in exported function names through a process called name mangling by using the C++ compiler function export directive, extern "C"{}, in your header file. |
Complete the following steps to create the front panel of the Array Average VI.
The following front panel belongs to the Array Average VI.
Complete the following steps to complete the block diagram of the Array Average VI.
The following block diagram shows the completed Array Average block diagram.
On the front panel, enter values in Array and run the VI to calculate the average of those values. Save your work and close the VI.
If your shared library returns incorrect results or crashes, verify the data types and wiring to see if you wired the wrong type of information.
Submit feedback on this topic.
Visit ni.com/support for technical support.