cocos2d-x 2.2.5 安卓工程编译的问题

原址:http://www.cocoachina.com/bbs/read.php?tid=217124
新的cocos2d-x 2.2.5 在使用Eclipse的安卓NDK 9 的编译器进行编译的时候,
问题提示如下:

[armeabi] Compile++ thumb: cocos_extension_static <= LabelReader.cpp
D:workcocos2d-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:workcocos2d-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  安卓下无法编译的问题。
1
2
3
4
5
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);
    }




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


解决方案:
导入头文件
#include <algorithm>
原文地址:https://www.cnblogs.com/shiweihappy/p/4246433.html