Hi,
I am trying to write a simple piece of code in C langage under windows7 64bit to test VISA on a 64bit platform.
---CODE---
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "visa.h"
/* Variables */
static char instrDescriptor[VI_FIND_BUFLEN];
static ViUInt32 numInstrs;
static ViFindList findList;
static ViSession defaultRM, instr;
static ViStatus status;
int main(void)
{
/* First we will need to open the default resource manager. */
status = viOpenDefaultRM (&defaultRM);
status = VI_SUCCESS-1;
if (status < VI_SUCCESS)
{
printf("Could not open a session to the VISA Resource Manager!\n");
}
return 0;
}
---END OF CODE---
I am able to compile this piece of code using the visa64.lib and a MinGW GCC compiler under windows.
My problem is that when I start the generated executale file, windows opens a window "test.exe has stopped working".
If I just comment the line where the VISA lib is accessed, the executable file works coorectly.
Someone has an idea to help me ?
regards