[SOLVED] Ubuntu 18.04 Jetson nano compile error

Hi, I have installed and run nuitrack to activate license and show demo successfully on Ubuntu 18.04 Jetson nano.
However, when I tried to compile example nuitrack_console_sample , error shows up. (same error shows up when trying compiling other examples)

I have checked $NUITRACK_HOME and $LD_LIBRARY_PATH are set correctly already.

vcam@vcam-desktop:/nuitrack-sdk/Examples/nuitrack_console_sample/build$ sudo make
[ 50%] Linking CXX executable nuitrack_console_sample
/usr/bin/ld: cannot find -lnuitrack
collect2: error: ld returned 1 exit status
CMakeFiles/nuitrack_console_sample.dir/build.make:94: recipe for target ‘nuitrack_console_sample’ failed
make[2]: * [nuitrack_console_sample] Error 1
CMakeFiles/Makefile2:67: recipe for target ‘CMakeFiles/nuitrack_console_sample.dir/all’ failed
make[1]: * [CMakeFiles/nuitrack_console_sample.dir/all] Error 2
Makefile:83: recipe for target ‘all’ failed
make: * [all] Error 2

Any thoughts on how to solve this? Thank you

Hi @komibin,

Please replace the UNIX condition with the following condition in cmake:

if(UNIX)
    IF (CMAKE_SYSTEM_PROCESSOR MATCHES "^arm")
        set(PLATFORM_DIR linux_arm)
    ELSEIF(CMAKE_SYSTEM_PROCESSOR MATCHES "^aarch")
		set(PLATFORM_DIR linux_arm64)
    ELSEIF(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" OR CMAKE_SYSTEM_PROCESSOR STREQUAL "amd64")
		set(PLATFORM_DIR linux64)
    ENDIF()

And for all the other C++ samples that you will test, it is also necessary to update cmake

Thank you! It works!