I am currently trying to program a Rigol DS1054 Oscilloscope to output waveform data. To create this program, I am writing in C++ using Code::Blocks, but I have tried this on four other compilers (Netbeans, Eclipse Mars, Eclipse Juno, Visual Basic 2012) but each one continuously results in an error. Here is what I have done so far:
- Confirmed that C++ was not the problem by building and running a Hello World program
- Linked the header file following this path (C:\Program Files (x86)\IVI Foundation\VISA\WinNT\Include)
- Linked the library using this path (C:\Program Files (x86)\IVI Foundation\VISA\WinNT\lib\msc\visa32.lib)
- Applied the library for each project
I have also tried using the 64-bit version as well an I get the same error. This is my current code:
#include <iostream>
#include <visa.h>
using namespace std;
int main () {
ViSession rmSession;
ViOpenDefaultRM(&rmSession);
return 0;
}
The code is very simple, but when run, returns this error:
error: 'ViOpenDefaultRm' was not declared in this scope
This is really weird since it is clearly in the scope. This has been giving me trouble for so many days now - any help would be very appreciated. Thank you!