How do I generate a DLL from my LabVIEW project code that can be called in other environments, such as LabWindows™/CVI™, or Visual Studio?
To generate a DLL from your LabVIEW project code, each function that you want to be able to call from the DLL will need to be contained in a separate VI in your LabVIEW project. Below is an example of a project tree with separate functions.
For each function VI, ensure all required inputs (controls) and outputs (indicators) are wired to the terminal connection pane in the front panel of LabVIEW. The below example function will be generated in the DLL as Add(X,Y).
In the Project Explorer, right-click Build Specifications and select New»Shared Library (DLL).
In the Build Properties dialog box, navigate to the Information category to name the build and the DLL, as well as where it is saved.
Next, navigate to the Source Files category to select what VIs you want to export to your DLL as functions.
You may optionally preview the build files in the Preview category.
You can now test the DLL by calling it in another environment such as LabWindows/CVI. Please read through Calling a LabVIEW DLL from a LabWindows/CVI or Other C Project to ensure you are calling it correctly.
Collaborate with other users in our discussion forums
A valid service agreement may be required, and support options vary by country.
Thank you for your feedback.
You changed your response to Not Helpful
You changed your response to Helpful