c++编译报错解决

1. std::array<>初始化

In file included from …/…/…/modules/audio_processing/aec3/dt_control.cc:11:0:
…/…/…/modules/audio_processing/aec3/dt_control.h:139:52: error: array must be initialized with a brace-enclosed initializer
std::array<float, kFftLengthBy2Plus1> cohde_ = {0};
^

gcc 5.4.0 does not accept a = {} initialization for std::array.
g++ 7.5.0支持

解决办法:
更兼容的写法:
More C++11 compliant solution is:
std::array<float, kFftLengthBy2Plus1> cohde_ = {{0}};

2. ‘powf’ is not a member of ‘std’

Up until C++11, powf was just a Microsoft-ism.
Since C++11, powf does appear in the ISO standard and is part of the std namespace.
For std::powf, gcc libstdc++ is not compliant while clang libc++ is.
gcc 没有实现std::powf, 用std::pow替代

3. error: inlining failed in call to always_inline ‘__m128i _mm_shuffle_epi8(__m128i, __m128i)’: target specific option mismatch

cflags += [“-msse4” ]

  • 7
    点赞
  • 8
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值