How Do I Create Import Libraries for a DLL in LabWindows™/CVI™

Updated Jan 9, 2023

Issue Details

How can I create an import library for a DLL in LabWindows/CVI?

 

Solution

When using LabWindows/CVI to link to an external DLL, one method is to use an import library to link the function call in LabWindows/CVI to the function definition in the corresponding DLL. 

In order to create an import library for a DLL in LabWindows/CVI, you will need the header file (.h) associated with the DLL. Typically DLLs come with a header file which contains information about the functions inside the DLL such as their names and parameters. You can create a header file by opening your source (.c) file and going to Build»Generate Prototypes. Once you have this header file, open the header file in LabWindows/CVI and then select Options»Generate DLL Import Library

Additional Information

Refer to the LabWindows/CVI Help for further information on using DLLs.