libSGM icon indicating copy to clipboard operation
libSGM copied to clipboard

There's some errors when i make the project

Open David-Paul666 opened this issue 6 years ago • 3 comments

When i make the project, there's some error, as follow:

Linking CXX executable stereo_test ../../src/libsgm.so: undefined reference to nppiFilterMedianGetBufferSize_16u_C1R' ../../src/libsgm.so: undefined reference to nppiFilterMedian_16u_C1R' collect2: error: ld returned 1 exit status sample/image/CMakeFiles/stereo_test.dir/build.make:107: recipe for target 'sample/image/stereo_test' failed make[2]: *** [sample/image/stereo_test] Error 1 CMakeFiles/Makefile2:140: recipe for target 'sample/image/CMakeFiles/stereo_test.dir/all' failed make[1]: *** [sample/image/CMakeFiles/stereo_test.dir/all] Error 2 Makefile:127: recipe for target 'all' failed make: *** [all] Error 2

My environment is ubuntu 16.04, cuda 9.1, thank you!

David-Paul666 avatar May 18 '18 08:05 David-Paul666

Hi. I'm sorry for missing description about CMake version. CMake version 3.10 supports NPP of CUDA9.x. So, try with CMake 3.10 or later. (I could build with CMake 3.10.3)

https://gitlab.kitware.com/cmake/cmake/commit/16589bf46f71a342ff88ac4566b5ed1ee106b33f

ykitta-fixstars avatar May 22 '18 02:05 ykitta-fixstars

Hi, thank you for your reply! It works when i try with cmake 3.11, The stereo_movie runs very well, but when i enable the zed demo and make , errors occurs as follow:

/home/pc/libSGM/sample/zed/zed_demo.cpp: In function ‘int main(int, char**)’: /home/pc/libSGM/sample/zed/zed_demo.cpp:43:21: error: ‘zed’ in namespace ‘sl’ does not name a type auto cap = new sl::zed::Camera(sl::zed::ZEDResolution_mode::VGA); ^ /home/pc/libSGM/sample/zed/zed_demo.cpp:44:6: error: ‘sl::zed’ has not been declared sl::zed::ERRCODE err = cap->init(sl::zed::MODE::PERFORMANCE, 0, true); ^ /home/pc/libSGM/sample/zed/zed_demo.cpp:45:6: error: ‘err’ was not declared in this scope if (err != sl::zed::ERRCODE::SUCCESS) { ^ /home/pc/libSGM/sample/zed/zed_demo.cpp:45:17: error: ‘sl::zed’ has not been declared if (err != sl::zed::ERRCODE::SUCCESS) { ^ /home/pc/libSGM/sample/zed/zed_demo.cpp:46:20: error: ‘sl::zed’ has not been declared std::cout << sl::zed::errcode2str(err) << std::endl; ^ /home/pc/libSGM/sample/zed/zed_demo.cpp:75:17: error: ‘sl::zed’ has not been declared cap->grab(sl::zed::SENSING_MODE::FULL, false, false); ^ /home/pc/libSGM/sample/zed/zed_demo.cpp:77:7: error: ‘sl::zed’ has not been declared sl::zed::Mat left_zm = cap->retrieveImage_gpu(sl::zed::SIDE::LEFT); ^ /home/pc/libSGM/sample/zed/zed_demo.cpp:78:7: error: ‘sl::zed’ has not been declared sl::zed::Mat right_zm = cap->retrieveImage_gpu(sl::zed::SIDE::RIGHT); ^ /home/pc/libSGM/sample/zed/zed_demo.cpp:80:27: error: ‘left_zm’ was not declared in this scope nppiRGBToGray_8u_AC4C1R(left_zm.data, width * 4, d_input_left, width, roi); ^ /home/pc/libSGM/sample/zed/zed_demo.cpp:81:27: error: ‘right_zm’ was not declared in this scope nppiRGBToGray_8u_AC4C1R(right_zm.data, width * 4, d_input_right, width, roi);

I have already installed the ZED sdk downloaded from web "https://www.stereolabs.com/".Looking forward to your reply, thank you!

David-Paul666 avatar May 22 '18 10:05 David-Paul666

I'm sorry for replying late. ZED SDK was updated, but we haven't change the demo yet. There is a PR(#12) about upgrading demo for ZED SDK 2.0. This may help you.

ykitta-fixstars avatar Jun 04 '18 05:06 ykitta-fixstars