error 1 when compiling extract_features.bin

132 views
Skip to first unread message

Александр Печкин

unread,
Dec 19, 2019, 7:32:41 AM12/19/19
to Caffe Users
Hello

After running make all, I get error 1, which seems to me related to opencv

opencv version - 3.2.0

what could be the problem?
 
pi@raspberrypi:~/caffe-rpi $ make all
CXX/LD -o .build_release/tools/extract_features.bin
/usr/bin/ld: .build_release/lib/libcaffe.so: undefined reference to `cv::String::allocate(unsigned int)'
/usr/bin/ld: .build_release/lib/libcaffe.so: undefined reference to `cv::imread(cv::String const&, int)'
/usr/bin/ld: .build_release/lib/libcaffe.so: undefined reference to `cv::String::deallocate()'
/usr/bin/ld: .build_release/lib/libcaffe.so: undefined reference to `cv::imencode(cv::String const&, cv::_InputArray const&, std::vector<unsigned char, std::allocator<unsigned char> >&, std::vector<int, std::allocator<int> > const&)'
collect2: error: ld returned 1 exit status
make: *** [Makefile:586: .build_release/tools/extract_features.bin] Error 1



E Merth

unread,
Dec 19, 2019, 9:27:30 AM12/19/19
to Caffe Users
In Makefile.config try uncommenting the line:

OPENCV_VERSION := 3

and then 

make clean
make

If your build still cannot find imread() then make sure it is linking against libopencv_imgcodecs.

Александр Печкин

unread,
Dec 25, 2019, 10:27:05 AM12/25/19
to Caffe Users

thank you, it helped
четверг, 19 декабря 2019 г., 17:27:30 UTC+3 пользователь E Merth написал:
Reply all
Reply to author
Forward
0 new messages