Hello,
Disclaimer: I am a newbie at all things C, including CFFI. Thus what I am trying to do may not be possible. The following is on Windows 7. I use clisp on cygwin.
I am trying to link to a VISA library (VISA is used to control data acquisition instruments), visa32.lib compiled for Windows. The library is shipped with Tektronix software.
The manual gives examples of using the library using C++, and I am trying to follow the first example. To me it looked pretty much like C - no objects, templates at least.
Problem: defcfun cannot find the function.
Here is the example code:
#include <visa.h>
#include <stdio.h>
#include <memory.h>
// This example opens a specific GPIB device, does an *idn query
// and prints the result.
int main(int argc, char* argv[])
{
ViSession rm = VI_NULL, vi = VI_NULL;
ViStatus status;
ViChar buffer[256];
ViUInt32 retCnt;
// Open a default session
status = viOpenDefaultRM(&rm); <--------------- I want to access this function
if (status < VI_SUCCESS) goto error;
// Open the GPIB device at primary address 1, GPIB board 8
status = viOpen(rm, “GPIB8::1::INSTR”, VI_NULL, VI_NULL,
&vi);
if (status < VI_SUCCESS) goto error;
... etc