'std' does not name a template type异常

./cf_libs/common/feature_channels.hpp:90:21: error: 'shared_ptr' in namespace 'std' does not name a template type
         static std::shared_ptr<FeatureChannels_> dftFeatures(
                     ^
./cf_libs/common/feature_channels.hpp:101:21: error: 'shared_ptr' in namespace 'std' does not name a template type
         static std::shared_ptr<FeatureChannels_> idftFeatures(
                     ^
./cf_libs/common/feature_channels.hpp:112:52: error: 'shared_ptr' in namespace 'std' does not name a template type
         static T squaredNormFeaturesCcs(const std::shared_ptr<FeatureChannels_>& Af)
                                                    ^
./cf_libs/common/feature_channels.hpp:112:62: error: expected ',' or '...' before '<' token
         static T squaredNormFeaturesCcs(const std::shared_ptr<FeatureChannels_>& Af)
                                                              ^
./cf_libs/common/feature_channels.hpp:132:54: error: 'shared_ptr' in namespace 'std' does not name a template type
         static T squaredNormFeaturesNoCcs(const std::shared_ptr<FeatureChannels_>& Af)
                                                      ^
./cf_libs/common/feature_channels.hpp:132:64: error: expected ',' or '...' before '<' token
         static T squaredNormFeaturesNoCcs(const std::shared_ptr<FeatureChannels_>& Af)
                                                                ^
./cf_libs/common/feature_channels.hpp:147:21: error: 'shared_ptr' in namespace 'std' does not name a template type
         static std::shared_ptr<FeatureChannels_> mulSpectrumsFeatures(const std::shared_ptr<FeatureChannels_>& Af,
                     ^
./cf_libs/common/feature_channels.hpp:159:21: error: 'shared_ptr' in namespace 'std' does not name a template type
         static std::shared_ptr<FeatureChannels_> mulSpectrumsFeatures(const cv::Mat& Af,
                     ^
./cf_libs/common/feature_channels.hpp: In static member function 'static void cf_tracking::FeatureChannels_<NUMBER_OF_CHANNELS, T>::mulValueFeatures(int)':
./cf_libs/common/feature_channels.hpp:55:17: error: 'm' was not declared in this scope
                 m->channels[i] *= value;
                 ^
./cf_libs/common/feature_channels.hpp:55:35: error: 'value' was not declared in this scope
                 m->channels[i] *= value;
                                   ^
./cf_libs/common/feature_channels.hpp: In static member function 'static void cf_tracking::FeatureChannels_<NUMBER_OF_CHANNELS, T>::addFeatures(int)':
./cf_libs/common/feature_channels.hpp:62:17: error: 'A' was not declared in this scope
                 A->channels[i] += B->channels[i];
                 ^
./cf_libs/common/feature_channels.hpp:62:35: error: 'B' was not declared in this scope
                 A->channels[i] += B->channels[i];
                                   ^
./cf_libs/common/feature_channels.hpp: In static member function 'static cv::Mat cf_tracking::FeatureChannels_<NUMBER_OF_CHANNELS, T>::sumFeatures(int)':
./cf_libs/common/feature_channels.hpp:67:27: error: 'x' was not declared in this scope
             cv::Mat res = x->channels[0].clone();
                           ^
./cf_libs/common/feature_channels.hpp: In static member function 'static cv::Mat cf_tracking::FeatureChannels_<NUMBER_OF_CHANNELS, T>::sumFeaturesInPlace(int)':
./cf_libs/common/feature_channels.hpp:78:17: error: 'x' was not declared in this scope
                 x->channels[0] += x->channels[i];
                 ^
./cf_libs/common/feature_channels.hpp:80:20: error: 'x' was not declared in this scope
             return x->channels[0];



太多的异常可能是c++11没有引用,模板类报的错,解决:

g++ -std=c++11

下面的异常:

/home/lbg/quwutest/main.cpp:59: error: 'i' cannot appear in a constant-expression
     min(img.at<Vec<float, 3>>(i, j)[0], img.at<Vec<float, 3>>(i, j)[1]),

这个异常解决方法也是c++11

QMAKE_CXXFLAGS += -std=c++11


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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

AI算法网奇

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值