Admin Production ni-theme
Current Publication

Using LabWindows/CVI Libraries in External Compilers

LabWindows/CVI

Using LabWindows/CVI Libraries in External Compilers

You can use the LabWindows/CVI libraries in an external compiler by creating executables and DLLs that call the LabWindows/CVI libraries. LabWindows/CVI ships with the run-time DLLs that contain all the libraries, and executable files you create in LabWindows/CVI also use these DLLs.

Note Note  Static libraries you create in LabWindows/CVI with a debug configuration are not supported outside of LabWindows/CVI.

LabWindows/CVI installs a startup library and DLL import libraries, all of which are compatible with your external compiler, in the msvc and msvc64 folders of following locations:

  • CVIversion\extlib
  • National Instruments\Shared\CVI\Extlib
  • ProgramData\National Instruments\CVIversion\extlib
Note Note  Never use the .lib files in the CVIversion\bin\msvc, CVIversion\bin\msvc64, National Instruments\Shared\CVI\Bin\msvc, or National Instruments\Shared\CVI\Bin\msvc64 directories in an external compiler.

You always must include the following two libraries in your external compiler project. These libraries are located in the CVIversion\extlib\msvc and CVIversion\extlib\msvc64 directory.

  • cvisupp.lib—Startup library
  • cvirt.lib—Import library to DLL containing the following libraries:

    • User Interface Library
    • Formatting and I/O Library
    • RS-232 Library
    • DDE Support Library
    • TCP Support Library
    • UDP Support Library
    • Utility Library

The following table lists the DLL import library files you can add to your external compiler project and the directories where those files are located on your computer. The DLL import library files are located in the msvc and msvc64 folders of the directories listed in the table.

Import Library File Library Location
analysis.lib Analysis or Advanced Analysis Library ProgramData\National Instruments\CVIversion\extlib
cviauto.lib ActiveX Library CVIversion\extlib
cvidotnet.lib .NET Library CVIversion\extlib
cvinetstreams.lib Network Streams Library CVIversion\extlib
cvinetv.lib Network Variable Library CVIversion\extlib
cvintwrk.lib Internet Library CVIversion\extlib
cvitdms.lib TDM Streaming Library CVIversion\extlib
dataacq.lib Traditional NI-DAQ Library CVIversion\extlib
gpib.lib GPIB/GPIB 488.2 Library CVIversion\extlib
ivi.lib IVI Library National Instruments\Shared\CVI\Extlib
nican.lib NI-CAN Library National Instruments\Shared\CVI\Extlib
nidaqmx.lib NI-DAQmx Library National Instruments\Shared\CVI\Extlib
nivxi.lib VXI Library CVIversion\extlib
visa.lib VISA Library National Instruments\Shared\CVI\Extlib

Note Note  Import library files for National Instruments hardware libraries might be located in CVIversion\extlib instead.

If you use an instrument driver that makes references to both the GPIB/GPIB 488.2 and VXI Libraries, you can include both gpib.lib and nivxi.lib to resolve the references to symbols in those libraries.

If you use functions in the Programmer's Toolbox, include CVIversion\toolslib\toolbox\msvc\toolbox.obj or CVIversion\toolslib\toolbox\msvc64\toolbox.obj in your external compiler project.

If you use an external compiler that requires a WinMain entry point, the optional library cviwmain.lib allows you to define only main in your program. The cviwmain.lib library file contains WinMain function that calls main.