lsd_SLAM Ubuntu16编译问题集锦

1。/usr/lib/x86_64-linux-gnu/libboost_system.so.1.54.0:-1: error: error adding symbols: DSO missing fro
boost filesystem

boost.filesystem处理目录确实方便,于是本人使用cmake来加载的boost,但使用filesystem出现这一bug。

上网google,别人说要加上"-lboost_system",但我添加上仍然不好使用。
最后,抱着试试的心态使用了
target_link_libraries(ABC boost_system boost_filesystem)  
2。编译时出现下列错误:error: undefined reference to `cv::imread(cv::String const&, int)'

    undefined reference to 'cv::imread(cv::String const&, int)'
    undefined reference to 'cv::String::deallocate()'
    undefined reference to 'cv::imread(cv::String const&, int)'
    undefined reference to 'cv::String::deallocate()'
    undefined reference to 'cv::String::allocate(unsigned long)'
    undefined reference to 'cv::String::allocate(unsigned long)'
    undefined reference to 'cv::String::deallocate()'
    undefined reference to 'cv::String::deallocate()'

    解决方法:在CMakeLists.txt加入安装OpenCV的版本号:
    将
    find_package( OpenCV REQUIRED )
    更改为
    find_package( OpenCV 3 REQUIRED ) 。

3。Could not find a package configuration file – OpenCVConfig.cmake
  I am playing nowadays with OpenCV for visual computing using C++ on Mac OS platform.I installed openCV and by default, it get installed in “/opt/local“. I wrote a test program in c++ using opencv library and tried to build it using cmake. But, I found following errors while running cmake.

    CMake Error at CMakeLists.txt:3 (find_package):

       By not providing "FindOpenCV.cmake" in CMAKE_MODULE_PATH this project has
       asked CMake to find a package configuration file provided by "OpenCV", but
       CMake did not find one.
      Could not find a package configuration file provided by "OpenCV" with any
       of the following names:
       OpenCVConfig.cmake
         opencv-config.cmake
      Add the installation prefix of "OpenCV" to CMAKE_PREFIX_PATH or set
       "OpenCV_DIR" to a directory containing one of the above files.  If "OpenCV"
       provides a separate development package or SDK, be sure it has been
       installed.
    -- Configuring incomplete, errors occurred!

    This means that you have to provide opencv directory information so that the opencv libs get available during making of the opencv project.
      Here are the solution:
     
      Quick solution: “Export the OpenCV_DIR into the current terminal”

       export OpenCV_DIR=~/opencv3.2.0/build

       If it works then,Permanent Solution: “Save it into .profile of MacOS”

      $ vim ~/.profile

4。 [ rosmake ] Last 40 linesd_slam_viewer: 3.9 sec ]                                                                          [ 1 Active 44/46 Complete ]
    {-------------------------------------------------------------------------------
      main_stitchVideos.cpp:(.text+0xd65c):对‘cv::imshow(cv::String const&, cv::_InputArray const&)’未定义的引用
      main_stitchVideos.cpp:(.text+0xd668):对‘cv::String::deallocate()’未定义的引用
      main_stitchVideos.cpp:(.text+0xd672):对‘cv::waitKey(int)’未定义的引用
      main_stitchVideos.cpp:(.text+0xd715):对‘cv::fastFree(void*)’未定义的引用
      main_stitchVideos.cpp:(.text+0xd7b5):对‘cv::fastFree(void*)’未定义的引用
      main_stitchVideos.cpp:(.text+0xd84d):对‘cv::fastFree(void*)’未定义的引用
      main_stitchVideos.cpp:(.text+0xd8e5):对‘cv::fastFree(void*)’未定义的引用
      main_stitchVideos.cpp:(.text+0xd985):对‘cv::fastFree(void*)’未定义的引用
      CMakeFiles/videoStitch.dir/src/main_stitchVideos.cpp.o:main_stitchVideos.cpp:(.text+0xda25): 跟着更多未定义的参考到 cv::fastFree(void*)
      CMakeFiles/videoStitch.dir/src/main_stitchVideos.cpp.o:在函数‘inlayVid(int, char**)’中:
      main_stitchVideos.cpp:(.text+0xdeb4):对‘cv::String::allocate(unsigned long)’未定义的引用
      main_stitchVideos.cpp:(.text+0xdedf):对‘cv::Mat::deallocate()’未定义的引用
      main_stitchVideos.cpp:(.text+0xdeec):对‘cv::Mat::deallocate()’未定义的引用
      main_stitchVideos.cpp:(.text+0xdefd):对‘cv::Mat::deallocate()’未定义的引用
      main_stitchVideos.cpp:(.text+0xdf0e):对‘cv::Mat::deallocate()’未定义的引用
      main_stitchVideos.cpp:(.text+0xdf1f):对‘cv::Mat::deallocate()’未定义的引用
      CMakeFiles/videoStitch.dir/src/main_stitchVideos.cpp.o:main_stitchVideos.cpp:(.text+0xdf30): 跟着更多未定义的参考到 cv::Mat::deallocate()
      CMakeFiles/videoStitch.dir/src/main_stitchVideos.cpp.o:在函数‘inlayVid(int, char**)’中:
      main_stitchVideos.cpp:(.text+0xdfb7):对‘cv::String::allocate(unsigned long)’未定义的引用
      main_stitchVideos.cpp:(.text+0xe212):对‘cv::String::deallocate()’未定义的引用
      main_stitchVideos.cpp:(.text+0xe23e):对‘cv::String::deallocate()’未定义的引用
      main_stitchVideos.cpp:(.text+0xe26e):对‘cv::String::deallocate()’未定义的引用
      main_stitchVideos.cpp:(.text+0xe282):对‘cv::String::deallocate()’未定义的引用
      main_stitchVideos.cpp:(.text+0xe2a6):对‘cv::String::deallocate()’未定义的引用
      CMakeFiles/videoStitch.dir/src/main_stitchVideos.cpp.o:main_stitchVideos.cpp:(.text+0xe353): 跟着更多未定义的参考到 cv::String::deallocate()
      CMakeFiles/videoStitch.dir/src/main_stitchVideos.cpp.o:在函数‘cv::Mat::~Mat()’中:
      main_stitchVideos.cpp:(.text._ZN2cv3MatD2Ev[_ZN2cv3MatD5Ev]+0x15):对‘cv::Mat::deallocate()’未定义的引用
      main_stitchVideos.cpp:(.text._ZN2cv3MatD2Ev[_ZN2cv3MatD5Ev]+0x76):对‘cv::fastFree(void*)’未定义的引用`
解决方法:export LD_LIBRARY_PATH=$LD_LIBARARY_PATH:/usr/local/lib 然后, sudo ldconfig

你可能感兴趣的:(图像)