【已解决】cocos2d-x 2.2.5 安卓工程编译的问题

新的cocos2d-x 2.2.5 在使用Eclipse的安卓NDK 9 的编译器进行编译的时候,
问题提示如下:

Compile++ thumb: cocos_extension_static <= LabelReader.cpp
D:\work\cocos2d-x-2.2.5/extensions/CocoStudio/Reader/WidgetReader/LabelReader/LabelReader.cpp: In member function ‘virtual void cocos2d::extension::LabelReader::setPropsFromJsonDictionary(cocos2d::ui::Widget*, const Value&)’:
D:\work\cocos2d-x-2.2.5/extensions/CocoStudio/Reader/WidgetReader/LabelReader/LabelReader.cpp:54:9:
error: ‘transform’ is not a member of ‘std’

主要就是/LabelReader.cpp 第54行调用的 transform 安卓下无法编译的问题。

if (pos != std::string::npos)
    {
        file_extension = fontName.substr(pos, fontName.length());
        std::transform(file_extension.begin(),file_extension.end(), file_extension.begin(), (int(*)(int))toupper);
    }
```




希望能够解决一下,更友好一点。

没有遇到过

你也是 2.2.5吗

问题已经解决了。
导入头文件
#include

谢谢,我也遇到这个问题,按照你的方法顺利通过!

在哪儿导入这个文件啊

楼上说得很清楚了:
#include <----- 新加的
#include “LabelReader.h”
#include “…/…/…/GUI/UIWidgets/UILabel.h”