xiaohulugo/VanishingPointDetection

cmake compile error

Closed this issue · 0 comments

i get a problem when i compile this project using cmake.Please help me to solve!Thanks

The compile information is that:
Scanning dependencies of target VanishingPoint [ 33%] Building C object CMakeFiles/VanishingPoint.dir/src/lsd.c.o [ 66%] Building CXX object CMakeFiles/VanishingPoint.dir/src/main.cpp.o [100%] Building CXX object CMakeFiles/VanishingPoint.dir/src/VPDetection.cpp.o In file included from /usr/include/c++/4.8/vector:64:0, from /usr/local/include/opencv2/core/types.hpp:53, from /usr/local/include/opencv2/core.hpp:58, from /usr/local/include/opencv2/opencv.hpp:52, from /home/curry/files/VanishingPointDetection/src/VPDetection.h:6, from /home/curry/files/VanishingPointDetection/src/VPDetection.cpp:1: /usr/include/c++/4.8/bits/stl_vector.h: In instantiation of ‘void std::vector<_Tp, _Alloc>::_M_initialize_dispatch(_Integer, _Integer, std::__true_type) [with _Integer = int; _Tp = std::vector<cv::Point3_<double> >; _Alloc = std::allocator<std::vector<cv::Point3_<double> > >]’: /usr/include/c++/4.8/bits/stl_vector.h:404:55: required from ‘std::vector<_Tp, _Alloc>::vector(_InputIterator, _InputIterator, const allocator_type&) [with _InputIterator = int; _Tp = std::vector<cv::Point3_<double> >; _Alloc = std::allocator<std::vector<cv::Point3_<double> > >; std::vector<_Tp, _Alloc>::allocator_type = std::allocator<std::vector<cv::Point3_<double> > >]’ /home/curry/files/VanishingPointDetection/src/VPDetection.cpp:82:67: required from here /usr/include/c++/4.8/bits/stl_vector.h:1166:59: error: no matching function for call to ‘std::vector<std::vector<cv::Point3_<double> > >::_M_fill_initialize(std::vector<std::vector<cv::Point3_<double> > >::size_type, int&)’ _M_fill_initialize(static_cast<size_type>(__n), __value); ^ /usr/include/c++/4.8/bits/stl_vector.h:1166:59: note: candidate is: /usr/include/c++/4.8/bits/stl_vector.h:1212:7: note: void std::vector<_Tp, _Alloc>::_M_fill_initialize(std::vector<_Tp, _Alloc>::size_type, const value_type&) [with _Tp = std::vector<cv::Point3_<double> >; _Alloc = std::allocator<std::vector<cv::Point3_<double> > >; std::vector<_Tp, _Alloc>::size_type = long unsigned int; std::vector<_Tp, _Alloc>::value_type = std::vector<cv::Point3_<double> >] _M_fill_initialize(size_type __n, const value_type& __value) ^ /usr/include/c++/4.8/bits/stl_vector.h:1212:7: note: no known conversion for argument 2 from ‘int’ to ‘const value_type& {aka const std::vector<cv::Point3_<double> >&}’ /usr/include/c++/4.8/bits/stl_vector.h: In instantiation of ‘void std::vector<_Tp, _Alloc>::_M_initialize_dispatch(_Integer, _Integer, std::__true_type) [with _Integer = int; _Tp = std::vector<double, std::allocator<double> >; _Alloc = std::allocator<std::vector<double, std::allocator<double> > >]’: /usr/include/c++/4.8/bits/stl_vector.h:404:55: required from ‘std::vector<_Tp, _Alloc>::vector(_InputIterator, _InputIterator, const allocator_type&) [with _InputIterator = int; _Tp = std::vector<double, std::allocator<double> >; _Alloc = std::allocator<std::vector<double, std::allocator<double> > >; std::vector<_Tp, _Alloc>::allocator_type = std::allocator<std::vector<double, std::allocator<double> > >]’ /home/curry/files/VanishingPointDetection/src/VPDetection.cpp:155:65: required from here /usr/include/c++/4.8/bits/stl_vector.h:1166:59: error: no matching function for call to ‘std::vector<std::vector<double, std::allocator<double> > >::_M_fill_initialize(std::vector<std::vector<double, std::allocator<double> > >::size_type, int&)’ _M_fill_initialize(static_cast<size_type>(__n), __value); ^ /usr/include/c++/4.8/bits/stl_vector.h:1166:59: note: candidate is: /usr/include/c++/4.8/bits/stl_vector.h:1212:7: note: void std::vector<_Tp, _Alloc>::_M_fill_initialize(std::vector<_Tp, _Alloc>::size_type, const value_type&) [with _Tp = std::vector<double, std::allocator<double> >; _Alloc = std::allocator<std::vector<double, std::allocator<double> > >; std::vector<_Tp, _Alloc>::size_type = long unsigned int; std::vector<_Tp, _Alloc>::value_type = std::vector<double, std::allocator<double> >] _M_fill_initialize(size_type __n, const value_type& __value) ^ /usr/include/c++/4.8/bits/stl_vector.h:1212:7: note: no known conversion for argument 2 from ‘int’ to ‘const value_type& {aka const std::vector<double, std::allocator<double> >&}’ make[2]: *** [CMakeFiles/VanishingPoint.dir/src/VPDetection.cpp.o] 错误 1 make[1]: *** [CMakeFiles/VanishingPoint.dir/all] 错误 2 make: *** [all] 错误 2