Chapter 3
Developing Your Application
© National Instruments Corp.
3-17
NI-488.2M UM for Windows NT
Step 10. Place the Board Offline
Before ending your application program, take the board offline using
the
ibonl
function.
ibonl(0,0);
Compiling, Linking, and Running Your GPIB Win32
Application
The following sections describe how to compile, link, and run your Win32 GPIB
application.
Microsoft Visual C/C++
Before you compile your Win32 C application, make sure that the following line is
included at the beginning of your program:
#include "decl-32.h"
After you have written your C application program, you must compile the application
program using Microsoft Visual C/C++ (version 2.0 or higher). Next, link the
application with the C language interface,
gpib-32.obj
. To compile and link a
Win32 console application named
cprog
in a DOS shell, type the following on the
command line:
cl cprog.c gpib-32.obj
To run your application from the Windows environment, select the Run... option from
the Start menu. Enter the name of the compiled program in the dialog box that appears.
To run your application from a DOS shell, type the name of your compiled program on
the DOS command line.
Direct Entry with C
Before you compile your Win32 C application, make sure that the following lines are
included at the beginning of your application:
#ifdef __cplusplus
extern "C"{
#endif
#include "decl-32.h"