caffe-yolo-9000
caffe-yolo-9000 copied to clipboard
Compile error
When I complie caffe, I get some error, the output information is list bellow! Can you help me?
#######################################################################
In file included from /usr/include/c++/4.8/algorithm:62:0,
from /home/zouhongwei/workspce/caffe-yolo-9000/include/caffe/blob.hpp:4,
from /home/zouhongwei/workspce/caffe-yolo-9000/include/caffe/caffe.hpp:7,
from /home/zouhongwei/workspce/caffe-yolo-9000/examples/yolo_9000_test/netforward.cpp:1:
/usr/include/c++/4.8/bits/stl_algo.h: In instantiation of ‘_RandomAccessIterator std::__unguarded_partition(_RandomAccessIterator, _Ra ndomAccessIterator, const _Tp&) [with _RandomAccessIterator = yolo_v2::DATA*; _Tp = yolo_v2::DATA]’:
/usr/include/c++/4.8/bits/stl_algo.h:2283:70: required from ‘_RandomAccessIterator std::__unguarded_partition_pivot(_RandomAccessIte rator, _RandomAccessIterator) [with _RandomAccessIterator = yolo_v2::DATA*]’
/usr/include/c++/4.8/bits/stl_algo.h:2315:54: required from ‘void std::__introsort_loop(_RandomAccessIterator, _RandomAccessIterator , _Size) [with _RandomAccessIterator = yolo_v2::DATA*; _Size = long int]’
/usr/include/c++/4.8/bits/stl_algo.h:5461:36: required from ‘void std::sort(_RAIter, RAIter) [with RAIter = yolo_v2::DATA*]’
/home/zouhongwei/workspce/caffe-yolo-9000/examples/yolo_9000_test/yolo_v2_output.h:97:51: required from ‘std::vector<yolo_v2::DATA> yolo_v2::getResult(std::vector
######################################################################
umm.. that is interesting can you change caffe-yolo-9000/examples/yolo_9000_test/yolo_v2_output.h:21
bool operator<(DATA data)
to
bool operator<(const DATA &data)
and try again?
I tried it, but it does not work!
got the same error?
yes, the same error!
On my ubuntu is ok use g++ g++ (Ubuntu 5.4.0-6ubuntu1~16.04.5) 5.4.0 i think you need to update your g++ to 5 or upper
myname:/usr/include/c++$ ls
4.9/ 4.9.3/ 5/ 5.4.0/
I had same problem, but I solved by changing caffe-yolo-9000/examples/yolo_9000_test/yolo_v2_output.h:21
bool operator<(DATA data) to bool operator<(const DATA &data) const
I hope it will help you