Caffe: opencv error

user1561108 picture user1561108 · Jul 6, 2015 · Viewed 15.4k times · Source

I've built opencv 3.0 from source and can run a few sample apps, build against the headers ok so I presume it's installed successfully.

I'm also using python3 and I now go to install and build caffe. I set a few variables in Makefile.config as I'm using the CPU due to having an AMD GPU and also Anaconda.

When I run make all I get this error:

$ make all
CXX/LD -o .build_release/examples/cpp_classification/classification.bin
/usr/bin/ld: .build_release/examples/cpp_classification/classification.o: undefined reference to symbol '_ZN2cv6imreadERKNS_6StringEi'
//usr/local/lib/libopencv_imgcodecs.so.3.0: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
Makefile:565: recipe for target '.build_release/examples/cpp_classification/classification.bin' failed
make: *** [.build_release/examples/cpp_classification/classification.bin] Error 1

from searching I think this is something to do with using openCV 3 but I'm not sure where to start looking for a solution. Any help?

And yes I'm one of the horde of inexperienced users looking to fiddle with the Google Inception learning technique.

Answer

Jon picture Jon · Oct 3, 2015

You can also add the opencv_imgcodecs to the MakeFile in line 187, see this pull.