Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

vc6.0下开发软件GPIB程充序

软件: Win7 32bit,VC++6.0

硬件:USB-GPIB-HS,tds220

 

我想在VC6.0下写一个程序通过USB-GPIB-HS控制tds220示波器,已经安装了驱动NI488.2,和visa502runtime,在编译示例程序的时候一直报错,不知道是少安装了东西,还是什么别的原因,请前辈们指点,谢谢!

 

主程序如下:

#include <stdio.h>
#include <stdlib.h>
//#include <userint.h>
#include "tktds2x0.h"
#include "tktds2x0.c"

main ()

{
    ViSession   tktds2x0;
    ViStatus    error = VI_SUCCESS;
    ViReal64    initialX, incrementX;
    ViInt32     actualRecordLength, actualPts;
    ViReal64    *waveform = VI_NULL;

        /*
            If you want to run this sample program and the instrument is not
            present, set the Simulate flag to 1.  (Example:  "Simulate = 1")
        */
    checkErr( tktds2x0_InitWithOptions ("GPIB::3::INSTR", VI_TRUE, VI_TRUE,
                                        "Simulate=0,RangeCheck=1,QueryInstrStatus=1,Cache=1",
                                        &tktds2x0));
 Error:
 return 1;

}

 

 

报的错主要是:

Linking...
tktds2x0_example.obj : error LNK2001: unresolved external symbol _Ivi_SetErrorInfo@20
tktds2x0_example.obj : error LNK2001: unresolved external symbol _Ivi_Dispose@4

0 Kudos
Message 1 of 3
(6,260 Views)

It seems you use the driver from the instruments vender.

Could you directly use the example of GPIB from NI VISA???

0 Kudos
Message 2 of 3
(6,250 Views)

Dear sir,

I solved this issue already. this problem accurred beacuse I didn't link the ".obj" file.

by the way, the dirver was downloaded from NI.

anyway thank you for your replay!

0 Kudos
Message 3 of 3
(6,246 Views)