0
CXX/LD -o .build_release/examples/cpp_classification/classification.bin
/usr/bin/ld: warning: libopencv_imgproc.so.3.2, needed by /usr/local/lib/libopencv_imgcodecs.so, may conflict with libopencv_imgproc.so.2.4
/usr/bin/ld: warning: libopencv_core.so.3.2, needed by /usr/local/lib/libopencv_imgcodecs.so, may conflict with libopencv_core.so.2.4
/usr/bin/ld: .build_release/examples/cpp_classification/classification.o: undefined reference to symbol '_ZN2cv6String10deallocateEv'
//usr/local/lib/libopencv_core.so.3.2: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
Makefile:633: recipe for target '.build_release/examples/cpp_classification/classification.bin' failed
make: *** [.build_release/examples/cpp_classification/classification.bin] Error 1

I keep getting this error when I compile caffe with make all command. I added opencv libraries in Makefile and uncommented the part where I set caffe to use opencv3 in Makefile.config. I recompiled opencv3 with -D BUILD_TIFF=ON and still nothing.

MoneyBall
  • 2,343
  • 5
  • 26
  • 59
  • you have two versions of opencv installed 3.2 and 2.4 and all are pointed on libopencv_imgcodecs.so symlic,you either have to unink one of them..escpeically if in your caffe Makefile you are using opencv=3 then you have to remove 2.4,good luck – Eliethesaiyan May 23 '17 at 02:21
  • //usr/local/lib/libopencv_core.so.3.2 check also if you havent an extra / infront of your opencv include dir – Eliethesaiyan May 23 '17 at 02:22
  • @Eliethesaiyan I have given up on this and am currently running caffe on a different machine... I'll let you know how fixing goes... – MoneyBall May 23 '17 at 13:07
  • Possible duplicate of [Strange linking error: DSO missing from command line](https://stackoverflow.com/questions/19901934/strange-linking-error-dso-missing-from-command-line) – perror Jul 18 '17 at 16:41

1 Answers1

0

I met the problem too. You can review the Makefile.config and check if the opencv lib dir in LIBRARY_DIRS. Or Uncomment to use pkg-config to specify OpenCV library paths. USE_PKG_CONFIG := 1

Miao
  • 1