User`s guide
14 Agilent VISA User’s Guide
2 Building a VISA Application in Windows
Building a VISA Program (C/C++)
This section provides guidelines for building VISA programs using the
C/C++ language, including:
• Compiling and Linking VISA Programs (C/C++)
• Sample VISA Program (C/C++)
Compiling and Linking VISA Programs (C/C++)
This section provides a summary of important compiler-specific
considerations when developing Win32 applications.
Linking to VISA Libraries
Your application must link to the VISA import library as follows,
assuming default installation directories and Microsoft compilers:
C:\VXIPNP\WinNT\lib\msc\visa32.lib
The following steps will help you do this. This information is specific to
your development environment.
Microsoft Visual C++ Version 6.0 Development Environment
1 Use the File menu to create a new project or open an existing project.
2 Select Project > Settings from the menu and click the C/C++ tab.
3 Select Code Generation from the Category list box and select
Multi-Threaded using DLL from the Use Run-Time Libraries list
box. (VISA requires these definitions for Win32.) Click OK to close
the dialog box.
4 Select Project > Settings from the menu. Click the Link tab and add
visa32.lib to the Object/Library Modules list box. Optionally,
you may add the library directly to your project file. Click OK to
close the dialog box.
5 You may want to add the include files and library files search paths.
They are set as follows:
• Select Tools > Options from the menu.
• Click the Directories tab to set the include file path.
• Select Include Files from the Show Directories For list box.