我正在使用经久耐用的mingw w64编译器(从2014年4月开始,使用g ++ 4.9.0),并且无法<memory>
使用-std=c++0x
或编译智能指针(包括header)gnu0x
。我总是得到相同的错误:
error: 'shared_ptr' in namespace 'std' does not name a template type
有人告诉我最新的gcc可以编译该文件。但这似乎不是我的情况。我想念什么吗?
删除-ansi
编译器标志。对于C ++,它等效于-std=c++98
。它紧随其后-std=c++11
并且正在覆盖它。std::shared_ptr
在C ++ 98中不存在
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句