Quantcast
Channel: Instrument Control (GPIB, Serial, VISA, IVI) topics
Viewing all articles
Browse latest Browse all 5565

VC++ and NI488.2

$
0
0

Hello,

 

I have installed NI488.2 Version 3.1.2.  I am using VC++ 10.0.

 

From the NI-VISA Manual, I have typed out the code below.  When I compile it, I get this error:  error LNK2019: unresolved external error symbol_viOpenDefaultRM@4 referenced in function_main.  This only happens after I include the status = viOpenDefaultRM(&defaultRM); line.  Does anyone know why this is?  I am not sure which library I am missing or how I would link to it.  However, I don't have any of the .obj or .lib files that I read on other forums.  I am also using Windows X 32-bit.

 

#include <stdio.h>
#include <Windows.h>
#include "visa.h"

#define MAX_CNT 200

int main(void)
{

    ViStatus status;
    ViSession defaultRM, instr;
    ViUInt32 retCount;
    ViChar buffer[MAX_CNT];
    
    status = viOpenDefaultRM(&defaultRM);
    if (status <VI_SUCCESS){
        return -1;
    }
            
 
    
}


Viewing all articles
Browse latest Browse all 5565

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>