VC下调试GPIB驱动自带演示程序打开与之相连的仪器的电源,出现连接错误!!!
//////////////////////////////////////////////////////////////////////////////////
VC下调试GPIB驱动自带演示程序打开与之相连的仪器的电源,出现连接错误!!!
//////////////////////////////////////////////////////////////////////////////////
VC6.0下调试GPIB驱动程序NI488.2里自带的演示程序,通过GPIB打开与之相连的仪器的电源,出现下面的连接错误:
我把用到的三个文件:CPP文件、头文件以及一个Txt说明文件贴上来,
请朋友帮忙提一些建议,谢谢啦。。。
//////////////////////////////////////////////////////////////////////////////////
--------------------Configuration: Simple - Win32 Debug--------------------
Linking...
Simple.obj : error LNK2001: unresolved external symbol _ibonl@8
Simple.obj : error LNK2001: unresolved external symbol _ibcntl
Simple.obj : error LNK2001: unresolved external symbol _ibrd@12
Simple.obj : error LNK2001: unresolved external symbol _ibwrt@12
Simple.obj : error LNK2001: unresolved external symbol _ibclr@4
Simple.obj : error LNK2001: unresolved external symbol _iberr
Simple.obj : error LNK2001: unresolved external symbol _ibsta
Simple.obj : error LNK2001: unresolved external symbol _ibdev@24
Debug/Simple.exe : fatal error LNK1120: 8 unresolved externals
Error executing link.exe.
Simple.exe - 9 error(s), 0 warning(s)
//////////////////////////////////////////////////////////////////////////////////
//文件说明
//////////////////////////////////////////////////////////////////////////////////
C/C++ SIMPLE Sample Application
This directory contains the following:
README.TXT - This readme file
SIMPLE.C - Win32 C sample application
Description
-----------
The Simple sample application was written to do a write and a read to
a Tektronix PS2520G Programmable Power Supply. The application is a
Win32 console application. It illustrates how to use the NI-488.2 API.
A Win32 console application is a Win32 application which uses text-
based input and output, not a graphical interface. This allows you to
quickly create a Win32 application by using simple input and output
functions like printf and scanf.
Checking Status with Global Variables
-------------------------------------
Each NI-488.2 call updates four global variables to reflect the status
of the device or board that you are using. The four global variables
are the status word (ibsta), the error variable (iberr), and the
count variables (ibcnt and ibcntl). Your application should check for
errors after each NI-488.2 call by looking at ibsta. The ERR bit in
ibsta indicates if the call succeeded or not. If the ERR bit is set,
iberr contains an error code. For a complete description of ibsta
bits and iberr error codes, see the online help. If you are writing a
multithreaded application, please refer to the online help on writing
multithreaded applications.
Compiling, Linking, and Running the Sample Application from the
Command Line
--------------------------------------------------------------
From the standard DOS shell command line, you can compile and link
the sample application, Simple.c, with the Microsoft Visual C++
language interface, Gpib-32.obj, using Microsoft Visual C++ (version
2.0 or higher), by typing in:
cl Simple.c ..\Gpib-32.obj
To run the application from the DOS shell, just type in the executable
name at the prompt. To run it from within Windows choose the RUN...
option from the START menu. Enter the name of the compiled application
in the dialog box that pops up.
More Information
----------------
Refer to the NI-488.2 online help for more information on application
development.
Copyright National Instruments Corporation.
All Rights Reserved.