Eclipse索引器无法解析shared_ptr [英] Eclipse indexer can't resolve shared_ptr
问题描述
在互联网上研究之后,我无法获得Eclipse索引器来解析来自GCC 4.4.4附带的C ++ 0x添加的shared_ptr。我确保创建我的项目与适当的Eclipse包括,所以它绝对寻找在4.4.4包含文件夹。
After researching this on the internet, I've been unable to get the Eclipse indexer to resolve "shared_ptr" from the C++0x additions that come with GCC 4.4.4. I made sure to create my project with the proper includes for Eclipse, so it's definitely looking in the the 4.4.4 include folders.
程序编译和运行很好。访问shared_ptr我正在使用#include< memory>。
The program compiles and runs just fine. To access shared_ptr I'm using "#include <memory>".
任何想法是什么打破了索引器?
Any idea what's breaking the indexer?
推荐答案
您需要为eclipse项目设置预处理器符号 __ GXX_EXPERIMENTAL_CXX0X __ 。 g ++自动添加,当你使用'-std = c ++ 0x',但eclipse不知道,所以它把相关标题的那些部分禁用。
You need to set the pre-processor symbol '__GXX_EXPERIMENTAL_CXX0X__' to the eclipse project. g++ automatically adds that when you use '-std=c++0x', but eclipse is not aware of that, so it treats those sections of the relevant headers as disabled.
这篇关于Eclipse索引器无法解析shared_ptr的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!