Using LabWindows/CVI Libraries in External Compilers【转】

Using LabWindows/CVI Libraries in External Compilers

» Table of Contents
NI LabWindows™/CVI™ 9.0 Help
October 2008

NI Part Number:
370051M-01

»View Product Info

You can use the LabWindows/CVI libraries in either of the compatible external compilers 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.

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

  • CVIxx/extlib
  • National Instruments/Shared/CVI/Extlib
  • Windows Vista: ProgramData/National Instruments/CVIxx/extlib
  • Windows XP/2000: Documents and Settings/All Users/Application Data/National Instruments/CVIxx/extlib
Note Note  Never use the .lib files in the CVIxx/bin/borland, CVIxx/bin/msvc, National Instruments/Shared/CVI/Bin/borland, or National Instruments/Shared/CVI/Bin/msvc directories in an external compiler.

You always must include the following two libraries in your external compiler project. These libraries are located in the CVIxx/extlib/borland and CVIxx/extlib/msvc 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
    • Real-Time Utility Library
    • TCP Support Library
    • UDP Support Library
    • Utility Library
Note Note  The Real-Time Utility Library is available when you install the LabWindows/CVI Real-Time Module. For more information about this library, refer to the LabWindows/CVI Real-Time Module Help»Real-Time Utility Library section of this help file.

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 borland and msvc folders of the directories listed in the table.

Import Library File Library Location
analysis.lib Analysis or Advanced Analysis Library Windows XP/2000: Documents and Settings/All Users/Application Data/National Instruments/CVIxx/extlib

Windows Vista: ProgramData/National Instruments/CVIxx/extlib
cviauto.lib ActiveX Library CVIxx/extlib
cviddc.lib DIAdem Connectivity Library CVIxx/extlib
cvidotnet.lib .NET Library CVIxx/extlib
cvintwrk.lib Internet Library CVIxx/extlib
cvinetv.lib Network Variable Library CVIxx/extlib
cvitdms.lib TDM Streaming Library CVIxx/extlib
dataacq.lib Traditional NI-DAQ Library CVIxx/extlib
gpib.lib GPIB/GPIB 488.2 Library CVIxx/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 CVIxx/extlib
visa.lib VISA Library National Instruments/Shared/CVI/Extlib

Note Note  Import library files for National Instruments hardware libraries might be located in CVIxx/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 do not have access to one of these files, you can replace it with one of following files, located in CVIxx/extlib/borland and CVIxx/extlib/msvc:

  • gpibstub.obj, which includes stub GPIB functions
  • vxistub.obj, which includes stub VXI functions

If you use functions in the Programmer's Toolbox, include CVIxx/toolslib/toolbox/borland/toolbox.obj or CVIxx/toolslib/toolbox/msvc/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.

你可能感兴趣的:(Using LabWindows/CVI Libraries in External Compilers【转】)