Why Does Linux GPIB for 64bits Not Have Libgpibapi-so?

Updated Jun 17, 2019

Reported In

Driver

  • NI-488.2

Operating System

  • Linux

Programming Language

  • C
  • C++

Issue Details

I used GPIB for 32bits on Linux and changed it to 64bits this time and installed the driver for 64bits, but I can not find libgpibapi.so. Why is this happening?
 

Solution

Based on NI-488.2 15.1 for Linux, the following objects are installed for 32-bit and 64-bit, respectively.
  • 32bits
$ rpm -ql ni4882i-15.1.0-f0.i386 | grep lib    
/usr/local/natinst/ni4882/lib 
/usr/local/natinst/ni4882/lib/cib.o 
/usr/local/natinst/ni4882/lib/libgpibapi.so.15.1.0 
/usr/local/natinst/ni4882/lib/libgpibenumsvc.so.15.1.0 
/usr/local/natinst/ni4882/lib/liblvgpibconf.so.15.1.0 
/usr/local/natinst/ni4882/lib/libni4882.so.15.1.0 
/usr/local/natinst/ni4882/lib/libni488config.so.15.1.0 
/usr/local/natinst/ni4882/lib/libniGPIBsys.so.15.1.0 
/usr/local/natinst/ni4882/lib/ni4882.o 
  • 64bits
$ rpm -ql ni4882i-15.1.0-f0.x86_64 | grep lib 
/usr/local/natinst/ni4882/lib64 
/usr/local/natinst/ni4882/lib64/libni4882.so.15.1.0 
/usr/local/natinst/ni4882/lib64/libni488config.so.15.1.0 
/usr/local/natinst/ni4882/lib64/libniGPIBsys.so.15.1.0 
/usr/local/natinst/ni4882/lib64/ni4882.o 
[usernet@swdev1 natinst]$ 

If you have installed the Linux GPIB driver for 64bits, it is normal for libgpibapi.so not to be installed. 
The NI 488.2 User manual has the following description:
The NI-488.2 for Windows 2.6, NI-488.2 for Linux 3.2, and NI-488.2 for Mac OS X 3.2 releases officially add support for a new API as part of the 64-bit application interface. Every effort has been made to have the new NI4882 API closely match the existing GPIB32 API while incorporating API design best practices. To use the new API, you must recompile applications using the new header and object files.

Modifying existing applications to use the NI4882 API should require minimal changes. In most cases, using the new include file (ni4882.h instead of ni488.h) and linking to the new object file:
(Windows) ni4882.obj instead of gpib-32.obj
(Linux) libni4882.so instead of libgpibapi.so
(OS X) ni4882.framework instead of ni488.framework

So if you want to reuse existing code, you need to change the header files and object files and recompile it. Please refer to the NI 488.2 User Manual to determine the differences between the two libraries.