[SOLVED] Cannot compile console sample on Ubuntu 18.04

Hi, I’m trying to compile the console sample on ubuntu 18.04 but I get it keeps returning an undefined reference error. I have following the installation instructions in the docs and have the environment variables set properly:

$ echo $NUITRACK_HOME
/usr/etc/nuitrack
$ echo $LD_LIBRARY_PATH
/usr/local/lib/nuitrack

However this is what happens when I try to compile:

$ g++ main.cpp -o main -I /home/evan/Downloads/NuitrackSDK/Nuitrack/include

/tmp/ccc5hQWa.o: In function tdv::nuitrack::HandTrackerData::getUsersHands() const': main.cpp:(.text._ZNK3tdv8nuitrack15HandTrackerData13getUsersHandsEv[_ZNK3tdv8nuitrack15HandTrackerData13getUsersHandsEv]+0x46): undefined reference tonuitrack_HandTrackerGetNumUsers’
main.cpp:(.text._ZNK3tdv8nuitrack15HandTrackerData13getUsersHandsEv[_ZNK3tdv8nuitrack15HandTrackerData13getUsersHandsEv]+0xb1): undefined reference to nuitrack_HandTrackerGetUserHands' /tmp/ccc5hQWa.o: In functiontdv::nuitrack::Nuitrack::init(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&)’:
main.cpp:(.text._ZN3tdv8nuitrack8Nuitrack4initERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE[_ZN3tdv8nuitrack8Nuitrack4initERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE]+0x1c): undefined reference to `nuitrack_InitializeFromConfig’
collect2: error: ld returned 1 exit status

Any help would be very much appreciated, thanks!

Solved: I didn’t notice that there was the example given along with a cmake file and instructions on how to compile in the SDK at NuitrackSDK/Examples/nuitrack_console_sample. I thought that the only information we had was for this example was the source code in the online docs:

http://download.3divi.com/Nuitrack/doc/nuitrack_console_sample_2src_2main_8cpp-example.html