Libopencv_core.so.2.4 not found when compiling example

Hi!

I’m trying to install nuitrack on Ubuntu 16.04 but get errors when compiling examples. I’ve followed the instructions here and then I downloaded the SDK with all the examples. When I try to build the examples with cmake I get this error:

/usr/bin/ld: warning: libopencv_core.so.2.4, needed by /home/max/Skrivbord/NuitrackSDK/Examples/nuitrack_console_sample/…/…/Nuitrack/lib/linux64/libnuitrack.so, not found (try using -rpath or -rpath-link)
/home/max/Skrivbord/NuitrackSDK/Examples/nuitrack_console_sample/…/…/Nuitrack/lib/linux64/libnuitrack.so: odefinierad referens till ”cv::fastFree(void*)”
/home/max/Skrivbord/NuitrackSDK/Examples/nuitrack_console_sample/…/…/Nuitrack/lib/linux64/libnuitrack.so: odefinierad referens till ”cv::error(cv::Exception const&)”
/home/max/Skrivbord/NuitrackSDK/Examples/nuitrack_console_sample/…/…/Nuitrack/lib/linux64/libnuitrack.so: odefinierad referens till ”cv::Exception::~Exception()”
/home/max/Skrivbord/NuitrackSDK/Examples/nuitrack_console_sample/…/…/Nuitrack/lib/linux64/libnuitrack.so: odefinierad referens till ”cv::Mat::create(int, int const*, int)”
/home/max/Skrivbord/NuitrackSDK/Examples/nuitrack_console_sample/…/…/Nuitrack/lib/linux64/libnuitrack.so: odefinierad referens till ”cv::_OutputArray::_OutputArray(cv::Mat&)”
/home/max/Skrivbord/NuitrackSDK/Examples/nuitrack_console_sample/…/…/Nuitrack/lib/linux64/libnuitrack.so: odefinierad referens till ”cv::_InputArray::_InputArray(cv::Mat const&)”
/home/max/Skrivbord/NuitrackSDK/Examples/nuitrack_console_sample/…/…/Nuitrack/lib/linux64/libnuitrack.so: odefinierad referens till ”cv::Mat::convertTo(cv::_OutputArray const&, int, double, double) const”
/home/max/Skrivbord/NuitrackSDK/Examples/nuitrack_console_sample/…/…/Nuitrack/lib/linux64/libmiddleware.so: odefinierad referens till ”cv::getTickCount()”
/home/max/Skrivbord/NuitrackSDK/Examples/nuitrack_console_sample/…/…/Nuitrack/lib/linux64/libmiddleware.so: odefinierad referens till ”cv::getTickFrequency()”
/home/max/Skrivbord/NuitrackSDK/Examples/nuitrack_console_sample/…/…/Nuitrack/lib/linux64/libnuitrack.so: odefinierad referens till ”cv::PCA::PCA(cv::_InputArray const&, cv::_InputArray const&, int, int)”
/home/max/Skrivbord/NuitrackSDK/Examples/nuitrack_console_sample/…/…/Nuitrack/lib/linux64/libnuitrack.so: odefinierad referens till ”cv::Exception::Exception(int, std::string const&, std::string const&, std::string const&, int)”
/home/max/Skrivbord/NuitrackSDK/Examples/nuitrack_console_sample/…/…/Nuitrack/lib/linux64/libnuitrack.so: odefinierad referens till ”cv::Mat::Mat(cv::Mat const&, cv::Range const&, cv::Range const&)”
/home/max/Skrivbord/NuitrackSDK/Examples/nuitrack_console_sample/…/…/Nuitrack/lib/linux64/libnuitrack.so: odefinierad referens till ”cv::Mat::deallocate()”
collect2: error: ld returned 1 exit status
CMakeFiles/nuitrack_console_sample.dir/build.make:94: receptet för målet ”nuitrack_console_sample” misslyckades
make[2]: *** [nuitrack_console_sample] Fel 1
CMakeFiles/Makefile2:67: receptet för målet ”CMakeFiles/nuitrack_console_sample.dir/all” misslyckades
make[1]: *** [CMakeFiles/nuitrack_console_sample.dir/all] Fel 2
Makefile:83: receptet för målet ”all” misslyckades
make: *** [all] Fel 2

Sorry its in swedish. But any ideas?

Hi Max,

Please, use this command to build the nuitrack_console_sample:
LD_LIBRARY_PATH=/usr/local/lib/nuitrack/ make

and this command to run:
LD_LIBRARY_PATH=/usr/local/lib/nuitrack/ nuitrack_console_sample

This error occurs because the OpenCV package is already installed to system. Nuitrack requires OpenCV libraries located at /usr/local/lib/nuitrack/