/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/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的版本就可以解决了

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值