在使用CCLuaEngine.h时报field has incomplete type

我自己建了个ios的静态库工程,然后按照HelloLua里面的方式,把scripting下的文件加到工程来,然后首次include CCLuaEngine.h文件,发现竟然报编译错误:field has incomplete type ‘cocos2d::CCLuaValue’

我看了CCLuaEngine里面的源代码,发现CCLuaValue的确是没有被定义完整,导致模版展开不能:
class CCLuaValue;
typedef std::map<std::string, CCLuaValue> CCLuaValueDict;typedef CCLuaValueDict::const_iterator CCLuaValueDictIterator;typedef std::list CCLuaValueArray;typedef CCLuaValueArray::const_iterator CCLuaValueArrayIterator;
但是,很神奇的是HelloLua竟然能编译运行通过,不知道为什么?
另外,我对xcode不是很了解,发现HelloLua的工程里,头文件搜索竟然没有scripting/lua等搜索路径,发现工程中还是能直接找到对应的lua文件,这是为什么呢?
谢谢大家指导。

好吧,弄明白怎么回事了,该了xcode的编译器版本,c++11降级了就好了

其实,话说回来,c++11其实是对编译的要求更严格了,希望以后cocos2d也更严格一些,另外一些win32的编译警告,希望作者有时间能去除,尤其是dll-interface,把标准库的一些对象直接暴露出去,这个很容易引起内存越界的