12-14-2010 08:24 PM
I'm having some difficulty making use of the NI Visa functions in CVI 9. If I open up one of the VISA examples in the VXIPNP\WinNT\NIvisa\Examples folder I have no problem. However, if I create a new UI project such as the below I get the following linker error: "Undefined symbol '_ViOpenDefaultRM'.
#include <utility.h>
#include <visa.h>
#include <ansi_c.h>
#include <cvirte.h>
#include <userint.h>
#include "User Interface Application.h"
#include "toolbox.h"
static int panelHandle;
int main (int argc, char *argv[])
{
int error = 0;
ViStatus status;
ViSession defaultRM;
/* initialize and load resources */
nullChk (InitCVIRTE (0, argv, 0));
errChk (panelHandle = LoadPanel (0, "User Interface Application.uir", PANEL));
/* display the panel and run the user interface */
errChk (DisplayPanel (panelHandle));
errChk (RunUserInterface ());
status = ViOpenDefaultRM(&defaultRM);
Error:
/* clean up */
DiscardPanel (panelHandle);
return 0;
}
Thanks,
Sean
12-15-2010 11:49 AM
HI Seanovsky,
I think the issue is with your ViOpenDefaultRM. I believe this should be viOpenDefaultRM, with a lower case v