In file included from /usr/include/c++/5/utility:69:0,
from /usr/include/c++/5/algorithm:60,
from /home/hhg/Documents/opencv-3.4.1/Install/include/opencv2/core/base.hpp:55,
from /home/hhg/Documents/opencv-3.4.1/Install/include/opencv2/core.hpp:54,
from /home/hhg/Documents/opencv-3.4.1/Install/include/opencv2/core/types_c.h:101,
from /home/hhg/Documents/opencv-3.4.1/Install/include/opencv2/core/core_c.h:48,
from /home/hhg/Documents/opencv-3.4.1/Install/include/opencv2/highgui/highgui_c.h:45,
from /home/hhg/projects/unbuntu_v/include/detectpeople.h:7,
from /home/hhg/projects/unbuntu_v/detectdemo2.cpp:3:
/usr/include/c++/5/bits/stl_relops.h:85:5: error: template with C linkage
template <class _Tp>
^
In file included from /usr/include/c++/5/utility:69:0,
from /usr/include/c++/5/algorithm:60,
from /home/hhg/Documents/opencv-3.4.1/Install/include/opencv2/core/base.hpp:55,
from /home/hhg/Documents/opencv-3.4.1/Install/include/opencv2/core.hpp:54,
from /home/hhg/Documents/opencv-3.4.1/Install/include/opencv2/core/types_c.h:101,
from /home/hhg/Documents/opencv-3.4.1/Install/include/opencv2/core/core_c.h:48,
from /home/hhg/Documents/opencv-3.4.1/Install/include/opencv2/highgui/highgui_c.h:45,
from /home/hhg/projects/unbuntu_v/include/detectpeople.h:7,
from /home/hhg/projects/unbuntu_v/include/detprocess.h:7,
from /home/hhg/projects/unbuntu_v/detprocess.cpp:1:
/usr/include/c++/5/bits/stl_relops.h:85:5: error: template with C linkage
template <class _Tp>
^
/usr/include/c++/5/bits/stl_relops.h:98:5: error: template with C linkage
template <class _Tp>
^
/usr/include/c++/5/bits/stl_relops.h:98:5: error: template with C linkage
template <class _Tp>
^
/usr/include/c++/5/bits/stl_relops.h:111:5: error: template with C linkage
template <class _Tp>
^
/usr/include/c++/5/bits/stl_relops.h:124:5: error: template with C linkage
template <class _Tp>
^
/usr/include/c++/5/bits/stl_relops.h:111:5: error: template with C linkage
template <class _Tp>
^
/usr/include/c++/5/bits/stl_relops.h:124:5: error: template with C linkage
template <class _Tp>
^
In file included from /usr/include/c++/5/bits/stl_pair.h:59:0,
from /usr/include/c++/5/utility:70,
from /usr/include/c++/5/algorithm:60,
from /home/hhg/Documents/opencv-3.4.1/Install/include/opencv2/core/base.hpp:55,
from /home/hhg/Documents/opencv-3.4.1/Install/include/opencv2/core.hpp:54,
from /home/hhg/Documents/opencv-3.4.1/Install/include/opencv2/core/types_c.h:101,
from /home/hhg/Documents/opencv-3.4.1/Install/include/opencv2/core/core_c.h:48,
from /home/hhg/Documents/opencv-3.4.1/Install/include/opencv2/highgui/highgui_c.h:45,
from /home/hhg/projects/unbuntu_v/include/detectpeople.h:7,
from /home/hhg/projects/unbuntu_v/detectdemo2.cpp:3:
/usr/include/c++/5/bits/move.h:45:3: error: template with C linkage
template<typename _Tp>
^
In file included from /usr/include/c++/5/bits/stl_pair.h:59:0,
from /usr/include/c++/5/utility:70,
from /usr/include/c++/5/algorithm:60,
from /home/hhg/Documents/opencv-3.4.1/Install/include/opencv2/core/base.hpp:55,
from /home/hhg/Documents/opencv-3.4.1/Install/include/opencv2/core.hpp:54,
from /home/hhg/Documents/opencv-3.4.1/Install/include/opencv2/core/types_c.h:101,
from /home/hhg/Documents/opencv-3.4.1/Install/include/opencv2/core/core_c.h:48,
from /home/hhg/Documents/opencv-3.4.1/Install/include/opencv2/highgui/highgui_c.h:45,
from /home/hhg/projects/unbuntu_v/include/detectpeople.h:7,
from /home/hhg/projects/unbuntu_v/include/detprocess.h:7,
from /home/hhg/projects/unbuntu_v/detprocess.cpp:1:
/usr/include/c++/5/bits/move.h:45:3: error: template with C linkage
template<typename _Tp>
^
/usr/include/c++/5/bits/move.h:174:3: error: template with C linkage
template<typename _Tp>
^
/usr/include/c++/5/bits/move.h:174:3: error: template with C linkage
template<typename _Tp>
^
/usr/include/c++/5/bits/move.h:193:3: error: template with C linkage
template<typename _Tp, size_t _Nm>
^
/usr/include/c++/5/bits/move.h:193:3: error: template with C linkage
template<typename _Tp, size_t _Nm>
^
In file included from /usr/include/c++/5/utility:70:0,
from /usr/include/c++/5/algorithm:60,
from /home/hhg/Documents/opencv-3.4.1/Install/include/opencv2/core/base.hpp:55,
from /home/hhg/Documents/opencv-3.4.1/Install/include/opencv2/core.hpp:54,
from /home/hhg/Documents/opencv-3.4.1/Install/include/opencv2/core/types_c.h:101,
from /home/hhg/Documents/opencv-3.4.1/Install/include/opencv2/core/core_c.h:48,
from /home/hhg/Documents/opencv-3.4.1/Install/include/opencv2/highgui/highgui_c.h:45,
from /home/hhg/projects/unbuntu_v/include/detectpeople.h:7,
from /home/hhg/projects/unbuntu_v/detectdemo2.cpp:3:
/usr/include/c++/5/bits/stl_pair.h:95:3: error: template with C linkage
template<class _T1, class _T2>
^
In file included from /usr/include/c++/5/utility:70:0,
from /usr/include/c++/5/algorithm:60,
from /home/hhg/Documents/opencv-3.4.1/Install/include/opencv2/core/base.hpp:55,
from /home/hhg/Documents/opencv-3.4.1/Install/include/opencv2/core.hpp:54,
from /home/hhg/Documents/opencv-3.4.1/Install/include/opencv2/core/types_c.h:101,
from /home/hhg/Documents/opencv-3.4.1/Install/include/opencv2/core/core_c.h:48,
from /home/hhg/Documents/opencv-3.4.1/Install/include/opencv2/highgui/highgui_c.h:45,
from /home/hhg/projects/unbuntu_v/include/detectpeople.h:7,
from /home/hhg/projects/unbuntu_v/include/detprocess.h:7,
from /home/hhg/projects/unbuntu_v/detprocess.cpp:1:
/usr/include/c++/5/bits/stl_pair.h:95:3: error: template with C linkage
template<class _T1, class _T2>
^
/usr/include/c++/5/bits/stl_pair.h:212:3: error: template with C linkage
template<class _T1, class _T2>
^
/usr/include/c++/5/bits/stl_pair.h:212:3: error: template with C linkage
template<class _T1, class _T2>
^
/usr/include/c++/5/bits/stl_pair.h:218:3: error: template with C linkage
template<class _T1, class _T2>
^
/usr/include/c++/5/bits/stl_pair.h:218:3: error: template with C linkage
template<class _T1, class _T2>
^
/usr/include/c++/5/bits/stl_pair.h:225:3: error: template with C linkage
template<class _T1, class _T2>
^
/usr/include/c++/5/bits/stl_pair.h:225:3: error: template with C linkage
template<class _T1, class _T2>
^
/usr/include/c++/5/bits/stl_pair.h:231:3: error: template with C linkage
template<class _T1, class _T2>
^
/usr/include/c++/5/bits/stl_pair.h:231:3: error: template with C linkage
template<class _T1, class _T2>
^
/usr/include/c++/5/bits/stl_pair.h:237:3: error: template with C linkage
template<class _T1, class _T2>
^
/usr/include/c++/5/bits/stl_pair.h:237:3: error: template with C linkage
template<class _T1, class _T2>
^
/usr/include/c++/5/bits/stl_pair.h:243:3: error: template with C linkage
template<class _T1, class _T2>
^
/usr/include/c++/5/bits/stl_pair.h:243:3: error: template with C linkage
template<class _T1, class _T2>
^
/usr/include/c++/5/bits/stl_pair.h:284:3: error: template with C linkage
template<class _T1, class _T2>
^
/usr/include/c++/5/bits/stl_pair.h:284:3: error: template with C linkage
template<class _T1, class _T2>
^
In file included from /usr/include/c++/5/bits/stl_algobase.h:61:0,
from /usr/include/c++/5/algorithm:61,
from /home/hhg/Documents/opencv-3.4.1/Install/include/opencv2/core/base.hpp:55,
from /home/hhg/Documents/opencv-3.4.1/Install/include/opencv2/core.hpp:54,
from /home/hhg/Documents/opencv-3.4.1/Install/include/opencv2/core/types_c.h:101,
from /home/hhg/Documents/opencv-3.4.1/Install/include/opencv2/core/core_c.h:48,
from /home/hhg/Documents/opencv-3.4.1/Install/include/opencv2/highgui/highgui_c.h:45,
from /home/hhg/projects/unbuntu_v/include/detectpeople.h:7,
from /home/hhg/projects/unbuntu_v/detectdemo2.cpp:3:
/usr/include/c++/5/bits/cpp_type_traits.h:72:3: error: template with C linkage
template<typename _Iterator, typename _Container>
^
In file included from /usr/include/c++/5/bits/stl_algobase.h:61:0,
from /usr/include/c++/5/algorithm:61,
from /home/hhg/Documents/opencv-3.4.1/Install/include/opencv2/core/base.hpp:55,
from /home/hhg/Documents/opencv-3.4.1/Install/include/opencv2/core.hpp:54,
from /home/hhg/Documents/opencv-3.4.1/Install/include/opencv2/core/types_c.h:101,
from /home/hhg/Documents/opencv-3.4.1/Install/include/opencv2/core/core_c.h:48,
from /home/hhg/Documents/opencv-3.4.1/Install/include/opencv2/highgui/highgui_c.h:45,
from /home/hhg/projects/unbuntu_v/include/detectpeople.h:7,
from /home/hhg/projects/unbuntu_v/include/detprocess.h:7,
from /home/hhg/projects/unbuntu_v/detprocess.cpp:1:
/usr/include/c++/5/bits/cpp_type_traits.h:72:3: error: template with C linkage
template<typename _Iterator, typename _Container>
^
/usr/include/c++/5/bits/cpp_type_traits.h:85:3: error: template with C linkage
template<bool>
^
/usr/include/c++/5/bits/cpp_type_traits.h:85:3: error: template with C linkage
template<bool>
^
/usr/include/c++/5/bits/cpp_type_traits.h:89:3: error: template specialization with C linkage
template<>
^
/usr/include/c++/5/bits/cpp_type_traits.h:89:3: error: template specialization with C linkage
template<>
^
/usr/include/c++/5/bits/cpp_type_traits.h:95:3: error: template with C linkage
template<class _Sp, class _Tp>
^
/usr/include/c++/5/bits/cpp_type_traits.h:95:3: error: template with C linkage
template<class _Sp, class _Tp>
^
/usr/include/c++/5/bits/cpp_type_traits.h:103:3: error: template with C linkage
template<typename, typename>
^
/usr/include/c++/5/bits/cpp_type_traits.h:103:3: error: template with C linkage
template<typename, typename>
^
/usr/include/c++/5/bits/cpp_type_traits.h:110:3: error: template with C linkage
template<typename _Tp>
^
/usr/include/c++/5/bits/cpp_type_traits.h:110:3: error: template with C linkage
template<typename _Tp>
^
/usr/include/c++/5/bits/cpp_type_traits.h:118:3: error: template with C linkage
template<typename _Tp>
^
/usr/include/c++/5/bits/cpp_type_traits.h:118:3: error: template with C linkage
template<typename _Tp>
^
/usr/include/c++/5/bits/cpp_type_traits.h:125:3: error: template specialization with C linkage
template<>
^
/usr/include/c++/5/bits/cpp_type_traits.h:125:3: error: template specialization with C linkage
template<>
^
/usr/include/c++/5/bits/cpp_type_traits.h:135:3: error: template with C linkage
template<typename _Tp>
^
/usr/include/c++/5/bits/cpp_type_traits.h:135:3: error: template with C linkage
template<typename _Tp>
^
/usr/include/c++/5/bits/cpp_type_traits.h:146:3: error: template specialization with C linkage
template<>
^
/usr/include/c++/5/bits/cpp_type_traits.h:146:3: error: template specialization with C linkage
template<>
^
/usr/include/c++/5/bits/cpp_type_traits.h:153:3: error: template specialization with C linkage
template<>
^
/usr/include/c++/5/bits/cpp_type_traits.h:153:3: error: template specialization with C linkage
template<>
^
/usr/include/c++/5/bits/cpp_type_traits.h:160:3: error: template specialization with C linkage
template<>
^
/usr/include/c++/5/bits/cpp_type_traits.h:160:3: error: template specialization with C linkage
template<>
^
/usr/include/c++/5/bits/cpp_type_traits.h:167:3: error: template specialization with C linkage
template<>
^
/usr/include/c++/5/bits/cpp_type_traits.h:167:3: error: template specialization with C linkage
template<>
^
/usr/include/c++/5/bits/cpp_type_traits.h:175:3: error: template specialization with C linkage
template<>
^
/usr/include/c++/5/bits/cpp_type_traits.h:175:3: error: template specialization with C linkage
template<>
^
/usr/include/c++/5/bits/cpp_type_traits.h:199:3: error: template specialization with C linkage
template<>
^
/usr/include/c++/5/bits/cpp_type_traits.h:199:3: error: template specialization with C linkage
template<>
^
/usr/include/c++/5/bits/cpp_type_traits.h:206:3: error: template specialization with C linkage
template<>
^
/usr/include/c++/5/bits/cpp_type_traits.h:206:3: error: template specialization with C linkage
template<>
^
/usr/include/c++/5/bits/cpp_type_traits.h:213:3: error: template specialization with C linkage
template<>
^
/usr/include/c++/5/bits/cpp_type_traits.h:213:3: error: template specialization with C linkage
template<>
^
/usr/include/c++/5/bits/cpp_type_traits.h:220:3: error: template specialization with C linkage
template<>
^
/usr/include/c++/5/bits/cpp_type_traits.h:220:3: error: template specialization with C linkage
template<>
^
/usr/include/c++/5/bits/cpp_type_traits.h:227:3: error: template specialization with C linkage
template<>
^
/usr/include/c++/5/bits/cpp_type_traits.h:227:3: error: template specialization with C linkage
template<>
^
/usr/include/c++/5/bits/cpp_type_traits.h:234:3: error: template specialization with C linkage
template<>
^
/usr/include/c++/5/bits/cpp_type_traits.h:234:3: error: template specialization with C linkage
template<>
^
/usr/include/c++/5/bits/cpp_type_traits.h:241:3: error: template specialization with C linkage
template<>
^
/usr/include/c++/5/bits/cpp_type_traits.h:241:3: error: template specialization with C linkage
template<>
^
/usr/include/c++/5/bits/cpp_type_traits.h:248:3: error: template specialization with C linkage
template<>
^
/usr/include/c++/5/bits/cpp_type_traits.h:248:3: error: template specialization with C linkage
template<>
^
/usr/include/c++/5/bits/cpp_type_traits.h:270:1: error: template specialization with C linkage
__INT_N(__GLIBCXX_TYPE_INT_N_0)
^
/usr/include/c++/5/bits/cpp_type_traits.h:270:1: error: template specialization with C linkage
__INT_N(__GLIBCXX_TYPE_INT_N_0)
^
/usr/include/c++/5/bits/cpp_type_traits.h:270:1: error: template specialization with C linkage
__INT_N(__GLIBCXX_TYPE_INT_N_0)
^
/usr/include/c++/5/bits/cpp_type_traits.h:270:1: error: template specialization with C linkage
__INT_N(__GLIBCXX_TYPE_INT_N_0)
^
/usr/include/c++/5/bits/cpp_type_traits.h:287:3: error: template with C linkage
template<typename _Tp>
^
/usr/include/c++/5/bits/cpp_type_traits.h:287:3: error: template with C linkage
template<typename _Tp>
^
/usr/include/c++/5/bits/cpp_type_traits.h:295:3: error: template specialization with C linkage
template<>
^
/usr/include/c++/5/bits/cpp_type_traits.h:295:3: error: template specialization with C linkage
template<>
^
/usr/include/c++/5/bits/cpp_type_traits.h:302:3: error: template specialization with C linkage
template<>
^
/usr/include/c++/5/bits/cpp_type_traits.h:302:3: error: template specialization with C linkage
template<>
^
/usr/include/c++/5/bits/cpp_type_traits.h:309:3: error: template specialization with C linkage
template<>
^
/usr/include/c++/5/bits/cpp_type_traits.h:309:3: error: template specialization with C linkage
template<>
^
/usr/include/c++/5/bits/cpp_type_traits.h:319:3: error: template with C linkage
template<typename _Tp>
^
/usr/include/c++/5/bits/cpp_type_traits.h:319:3: error: template with C linkage
template<typename _Tp>
^
/usr/include/c++/5/bits/cpp_type_traits.h:326:3: error: template with C linkage
template<typename _Tp>
^
/usr/include/c++/5/bits/cpp_type_traits.h:326:3: error: template with C linkage
template<typename _Tp>
^
/usr/include/c++/5/bits/cpp_type_traits.h:336:3: error: template with C linkage
template<typename _Tp>
^
/usr/include/c++/5/bits/cpp_type_traits.h:336:3: error: template with C linkage
template<typename _Tp>
^
/usr/include/c++/5/bits/cpp_type_traits.h:343:3: error: template with C linkage
template<typename _Iterator, typename _Container>
^
/usr/include/c++/5/bits/cpp_type_traits.h:343:3: error: template with C linkage
template<typename _Iterator, typename _Container>
^
/usr/include/c++/5/bits/cpp_type_traits.h:354:3: error: template with C linkage
template<typename _Tp>
^
/usr/include/c++/5/bits/cpp_type_traits.h:354:3: error: template with C linkage
template<typename _Tp>
^
/usr/include/c++/5/bits/cpp_type_traits.h:362:3: error: template with C linkage
template<typename _Tp>
^
/usr/include/c++/5/bits/cpp_type_traits.h:362:3: error: template with C linkage
template<typename _Tp>
^
/usr/include/c++/5/bits/cpp_type_traits.h:370:3: error: template with C linkage
template<typename _Tp>
^
/usr/include/c++/5/bits/cpp_type_traits.h:370:3: error: template with C linkage
template<typename _Tp>
^
/usr/include/c++/5/bits/cpp_type_traits.h:377:3: error: template specialization with C linkage
template<>
^
/usr/include/c++/5/bits/cpp_type_traits.h:377:3: error: template specialization with C linkage
template<>
^
/usr/include/c++/5/bits/cpp_type_traits.h:385:3: error: template specialization with C linkage
template<>
^
/usr/include/c++/5/bits/cpp_type_traits.h:385:3: error: template specialization with C linkage
template<>
^
/usr/include/c++/5/bits/cpp_type_traits.h:393:3: error: template with C linkage
template<typename _Tp>
^
/usr/include/c++/5/bits/cpp_type_traits.h:393:3: error: template with C linkage
template<typename _Tp>
解决方法:
opencv版本问题,将opencv3的版本换成opencv2的版本就可以解决了