AnsweredAssumed Answered

Visa32 C++. Basic operations

Question asked by egochnpp@gmail.com on May 18, 2018
Latest reply on May 25, 2018 by tevans

Hello.
Is there any way to use functions from Visa32.dll without installing IO Libraries Suite?
For example, very simple code:

//The program has the name "1.cpp"
//For MinGW compilator:
//g++ 1.cpp -I"C:\Program Files\IVI Foundation\VISA\WinNT\Include" -L"C:\Program Files\IVI Foundation\VISA\WinNT\lib\msc" -lvisa32 -o 1.exe

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

int main()
{
     ViSession defaultRM, vi;

     viOpenDefaultRM(&defaultRM);
     viOpen(defaultRM, "ASRL1::INSTR", VI_NULL, VI_NULL, &vi);

     viClose(vi);
     viClose(defaultRM);

     printf("All Right! Press any key to exit");
    getchar();
    return 0;
}

The programm compilation is well, but if the service "Agilent IO Libraries Service" is stopped, exe-file has no responce (so, you cannot see the message "All Right! Press any key to exit").
I want to compile program on computer with IO Libraries suite installed, but I want use it on technology notebook without IO Libraries Suite.
Any ideas?

Outcomes