I saw another post on here with a very similar problem to mine. However, I could not get those suggestions to work. I have installed NI488.2 Version 3.1.2. I am using VC++ 10.0, but I have am using Visual Studio Command Prompt to run c code.
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. I found the visa32.lib and moved in into the lib folder for Visual Studio. It did not work unfortunately. Any other suggestions would be appreciated.
#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;
}
}