LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Not able to run my cpp program using visa.h library in my linux machine

I want to setup NI-VISA in my linux machine and want to program hardware devices with cpp program .

i installed NI-VISA drivers in my machine , created a cpp program and included the <visa.h> library , but my compiler says not able to find this library .(and in linux machine not able to find this library anywhere . could anyone please help me for this where i am missing. Please illiustrate all the steps )

I tried the same in windows getting the same error ,but i found the visa.h library so i given the exact path but now it is saying unable to recognise the defined functions.

 

Thanks in advance🙂

0 Kudos
Message 1 of 3
(174 Views)

You don’t usually include headers by full path but instead add the directory where they are located to the include path for your compiler or project. In the case of visa.h this is important since that header file uses other header files in the same directory.

 

As to your Linux box, NI VISA is not a standard component that comes preinstalled in Linux nor does your package manager normally know where to get it from. With the many zillion different Linux distributions, package managers and repository locations, there is also no single canonical way to install it. You need to download the correct deb or rpm feed for your system from the NI servers, install it so your package manager knows where it can find it and then install it on your machine. If you haven’t one of the NI supported distributions, things can get even more complicated.

 

once you got it installed there will be a /usr/include/ni-visa directory. You then need to add a -I/usr/include/n-ivisa parameter to your compiler command line to tell it to search that directory too for headers.

Rolf Kalbermatter
My Blog
Message 2 of 3
(135 Views)

The header file is located in /usr/include 

Reference: Location of Header File for NI Scope in Linux OS Environment 

-------------------------------------------------------
Control Lead | Intelline Inc
0 Kudos
Message 3 of 3
(106 Views)