How to use wiringJet for jetson nano

Hi
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(${PROJECT_NAME}

src/${PROJECT_NAME}/ads7830.cpp

)

ADS7830

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

MPU5060

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

PCA9685

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

How do I replace the lib refences?
Thanks in advance

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

/usr/src/jetson_multimedia_api/argus

This file may be helpful for this query:

/usr/src/jetson_multimedia_api/argus/cmake/FindArgus.cmake

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.