How to use wiringJet for jetson nano

I’m working on a ROS-robotic-project and want to use the jetson nano with the former rpi extension board (ads7830, mpu6050, pca9685), the driver uses the wiringPi library so it’s exciting that now the wiringJet library can handle that for the nano!
But I don’t understand how to change the linker settings in my CMakeList.txt:

“To use wiringJet in your program, #include <wiringJet.h> and add -lwiringjet -lpthread to your linker settings.”

External C++ library

find_library(WIRINGPI_LIBRARIES NAMES wiringPi)

Declare a C++ library





add_library(libads7830 STATIC ${LIBRARY_DIRS}/ads7830.cpp)
target_link_libraries(libads7830 ${WIRINGPI_LIBRARIES})


add_library(libmpu5060 STATIC ${LIBRARY_DIRS}/mpu5060.cpp)
target_link_libraries(libmpu5060 ${WIRINGPI_LIBRARIES})


add_library(libpca9685 STATIC ${LIBRARY_DIRS}/pca9685.cpp)
target_link_libraries(libpca9685 ${WIRINGPI_LIBRARIES})

How do I replace the lib refences?
Thanks in advance

We use cmake for build ing Argus samples. For reference, you may check the code in


This file may be helpful for this query:


Thank you for your reply, i managed the linker settings, but was unable to compile the servo controller code because of not yet implemented functions in wiringJet I think:

/usr/bin/ld: servo_controller.cpp:(.text+0x64): undefined reference to PCA9685::PCA9685(int, int)' /usr/bin/ld: servo_controller.cpp:(.text+0xa0): undefined reference to PCA9685::connect()’
/usr/bin/ld: servo_controller.cpp:(.text+0x220): undefined reference to PCA9685::set_pwm_freq(float)' /usr/bin/ld: servo_controller.cpp:(.text+0x354): undefined reference to PCA9685::connect()’
/usr/bin/ld: servo_controller.cpp:(.text+0x4d8): undefined reference to PCA9685::set_pwm_freq(float)' /usr/bin/ld: servo_controller.cpp:(.text+0x6bc): undefined reference to PCA9685::~PCA9685()’
/usr/bin/ld: servo_controller.cpp:(.text+0x6cc): undefined reference to `PCA9685::~PCA9685()’

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.