OpenKinect / libfreenect2

Open source drivers for the Kinect for Windows v2 device
2.08k stars 752 forks source link

undefined reference when using with pytorch #1097

Open ixtiyoruz opened 5 years ago

ixtiyoruz commented 5 years ago

Overview Description: i am getting this error: CMakeFiles/Protonect.dir/Protonect.cpp.o: In function MyFileLogger::log(libfreenect2::Logger::Level, std::string const&)': /home/ixtiyor/Downloads/libfreenect2/examples/Protonect.cpp:93: undefined reference tolibfreenect2::Logger::level2str(libfreenect2::Logger::Level)' CMakeFiles/Protonect.dir/Protonect.cpp.o: In function main': /home/ixtiyor/Downloads/libfreenect2/examples/Protonect.cpp:282: undefined reference tolibfreenect2::Freenect2::openDevice(std::string const&, libfreenect2::PacketPipeline const*)' /home/ixtiyor/Downloads/libfreenect2/examples/Protonect.cpp:275: undefined reference to libfreenect2::Freenect2::getDefaultDeviceSerialNumber()' /home/ixtiyor/Downloads/libfreenect2/examples/Protonect.cpp:287: undefined reference tolibfreenect2::Freenect2::openDevice(std::string const&)' collect2: error: ld returned 1 exit status CMakeFiles/Protonect.dir/build.make:152: recipe for target 'Protonect' failed make[2]: [Protonect] Error 1 CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/Protonect.dir/all' failed make[1]: [CMakeFiles/Protonect.dir/all] Error 2 Makefile:83: recipe for target 'all' failed make: *** [all] Error 2

Steps to Reproduce:

  1. install pytorch using this
  2. change the CMakeLists.txt file as shown in the link above
  3. then build with:
    mkdir build
    cd build
    cmake -DCMAKE_PREFIX_PATH="/home/ixtiyor/Downloads/pytorchc++/libtorch;$HOME/freenect2/lib/cmake/freenect2" ..
    cmake --build .

can somebody help me please ?