U12 Mac & Linux Driver (ljacklm) | LabJack
« Close

Datasheets and User Guides

App Notes

Software & Driver


U12 Mac & Linux Driver (ljacklm)

The high-level U12 driver for Linux and Mac OS X.  The ljacklm driver is a port of the ljackuw Windows driver and contains the same functions documented in Section 4 of the U12 User's Guide, excluding Windows specific functions such as GetWinVersion.  The driver requires the Exodriver version 2.05 or above before installation.  The Exodriver web page and download can be found here:


The ljacklm.zip package contains the ljacklm driver's source code, installation instructions and C example code.  For more details on the driver and the contents of the package, please refer to the README in the zip.

For macOS users: The ljacklm_mac_installer.zip package contains an installer for convenience. It installs the ljacklm driver, header file and all the software ljacklm requires such as the Exodriver. Download the ljacklm source code for the C examples.

macOS 10.15.4 and later is not supported: ljacklm relies on Apple kernel extensions, which are deprecated in 10.15.4. As an alternative, the LabJack T-Series devices and its T-series software will maintain support for macOS 10.15.4 and later.



I get an error saying the -lljacklm library is not found when trying to compile the examples. Of course I first installed the exodrive etc. How could I solve this?


Thanks in advance.

got it ;)

I'm trying to install the U12 and am constantly failing. I tried installing the exodriver from source with the clang compiler, after it didn't work with gcc. With clang I was able to compile, but the examples in ljacklm didn't work as they should. Now I'm trying to install ljacklm with the prebuilt installer. But how do I then access the liblabjackusb/ which I have to in order to install ljacklm?


Thanks a lot!

To build ljacklm you need Exodriver (liblabjackusb) installed.  The files by needed from the Exodriver are in the /usr/local/lib and /usr/local/include directories.  What kind of errors are you getting when you are building?  Also, do you have gcc installed from XCode?


I have a problem: I am programming a robot prototype and am trying to read out some sensor values with a U12. The Code is in C++ on Linux (Ubuntu 12.04). I downloaded the library and installed it. Installation seems fine, since test programs like easyFunctions work. Now my question: how can I use for example EAnalogIn in a .cpp file? I tried including "ljacklm.h" and call the function like it is done in the test files, but error "undefined reference to 'EAnalogIn' " occurs. I also tried extern "C"{}, but this seems unnecessary since it's already done in the header file. I'm quite new to programming and interfacing is entirely new, so excuse me if the problem is very obvious. I also was wondering how the  include of the header file can be sufficient since the .h file only seems to supply forward declarations instead of actual functions which seem to be located in the ljacklm.c file.

You are probably not linking to the libljacklm.so library with those kind of errors. In your Makefile use the -l option to link to the library. Something like this (note when linking you do not include the lib portion of the name):

g++ easyFunctions.cpp -lljacklm -o easyFunctions

I just updated the download. You should reinstall the library with the current version 1.20.02. I found that the Makefile had a mistake and was not linking the math library properly. The library and example's Makefiles have been updated to fix this.

Correct, missing linking was the problem. I was able to solve it as follow in the CMakeLists file:

# set the path to the library folder - here the installer apparently installed the .so files

# link the libraries to the executable - my_node is the node that relies on the library
target_link_libraries (my_node ljacklm)