Issue #135 new

ground_estimation linking problems

Sam-Nicolai Johnston
created an issue



  • Ubuntu: 16.04
  • OpenCV: 2.4.13
  • CUDA toolkit: 8.0


I'm trying to get Step 2: compile CPU only code to work, but I'm having some linking problems. When, I run make, there's an error when linking the executable:

[100%] Linking CXX executable ground_estimation
/usr/bin/ld: /usr/local/lib/libopencv_core.a(persistence.cpp.o): undefined reference to symbol 'gzclose'
//lib/x86_64-linux-gnu/ error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
CMakeFiles/ground_estimation.dir/build.make:1792: recipe for target 'ground_estimation' failed
make[2]: *** [ground_estimation] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/ground_estimation.dir/all' failed
make[1]: *** [CMakeFiles/ground_estimation.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2

It seems to be a problem with the way the libraries are linked, but I can't figure out why or how to solve it.

Thanks for any help! Sam

Comments (4)

  1. Shinichiro Murakami

    I found the solution. Just comment out opencv libraries as below. I think the order of linking library is wrong. When you comment out the lines, cmake finds proper libs based on pkg-config.

    #    opencv_core opencv_imgproc opencv_highgui opencv_ml
    #    opencv_video opencv_features2d
    #    opencv_calib3d
    #    opencv_objdetect opencv_contrib
    #    opencv_legacy opencv_flann
    #    opencv_gpu
    #   ) # quick hack for opencv2.4 support
  2. Log in to comment