LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

visa linker error

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

0 Kudos
Message 1 of 2
(2,964 Views)

HI Seanovsky,

I think the issue is with your ViOpenDefaultRM.  I believe this should be viOpenDefaultRM, with a lower case v

Regards,

Hassan Atassi
Senior Group Manager, Digital Support
0 Kudos
Message 2 of 2
(2,921 Views)