解决:function in namespace ‘std’ does not name a type + allocator_/nullptr/dellocator_ was not declared + base operand of ‘->’ has non-pointer type ‘std::vector<cv::Mat>’ 错误编译时报错(caffe)

解决方法,用到了c++11,g++命令需要加上-std=c++11选项

 

附:g++默认的c++标准

gcc-6.4.0 gcc-7.2.0 默认是 -std=gnu++14
gcc-4.3.6 gcc-4.4.7 gcc-4.5.4 gcc-4.6.4 gcc-4.7.4 gcc-4.8.5 gcc-4.9.4 gcc-5.4.0 默认是 -std=gnu++98
gcc-3.0.4 gcc-3.1.1 gcc-3.2.3 gcc-3.3.6 gcc-3.4.6 gcc-4.0.4 gcc-4.1.2 gcc-4.2.4 默认是 -std=gnu89 

 

 其他可能错误原因:

https://www.cnblogs.com/wjgrt/p/8059074.html

相关文章:

  • 2022-12-23
  • 2021-12-18
  • 2021-10-06
  • 2022-12-23
  • 2021-05-16
  • 2022-12-23
  • 2021-07-16
  • 2021-08-06
猜你喜欢
  • 2022-12-23
  • 2021-07-21
  • 2022-12-23
  • 2022-12-23
  • 2021-04-28
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案