Undefined Symbol Error with NI Instrument Drivers in LabWindows™/CVI™

Updated Jun 12, 2024

Reported In


  • LabWindows/CVI

Issue Details

I am trying to compile a LabWindows™/CVI™ project that uses several NI instrument driver libraries such as NI-VXI, GPIB, NI-DAQmx, NI-DMM, NI-SWITCH, etc. When I build the project, I receive undefined symbol errors for each of the functions related to these drivers in my project. I did not receive these errors in a different system and I have not changed my project settings. What is causing this error and how can I resolve it?


1. This error occurs when the LabWindows™/CVI™ linker cannot find the .lib file for the instrument libraries. These libraries can be automatically linked into projects from the Library >> Customize Library Menu dialog. Select the libraries to add to the LabWindows™/CVI™ Library Menu and enable them to be linked to projects. If the specific NI driver is not listed in this list then you can manually add the .lib file by following these steps:
a. Click on Edit >> Add Files to Project >> Library.
b. Locate the .lib file for the driver that is causing the linker errors. Here are some common locations depending on the driver:
  • NI-DMM, NI-SWITCH: C:\Program Files (x86)\IVI Foundation\IVI\Lib\msc
  • NI-DAQmx: C:\Program Files (x86)\National Instruments\Shared\CVI\Bin\msvc
  • VXI, GPIB: C:\Program Files (x86)\National Instruments\CVI<version>\bin\msvc\nivxi.lib
Note: If you are using a 64-bit project look for the equivalent paths at Program Files.
c. Add the .lib file to your project for the missing instrument drivers and recompile the project.

In earlier versions of LabWindows™/CVI™, a stub version of these libraries was automatically linked to projects when the VXI or GPIB/GPIB 488.2 libraries were disabled. This stub version allows projects with VXI or GPIB references to be built when the vxi.lib and gpib.lib libraries are not on the system. 

You may find the stub files in the following locations:
  • GPIB <National Instruments>\CVIversion\bin\msvc\gpibstub.obj
  • VXI <National Instruments>\CVIversion\bin\msvc\vxistub.obj
Where version is the version number of LabWindows™/CVI™ you are using. You can add the stub files to your project to build your project without the .lib files.

2. If the issue persists, reinstalling the NI Driver.

Additional Information

The "Undefined Symbol" error is generic and can appear in a lot of cases. Take a look at the articles in the Related Links section for more information on how to troubleshoot this type of error.