调用不可用的功能“系统":在iOS上不可用 [英] Call to unavailable function 'system': not available on iOS

查看:89
本文介绍了调用不可用的功能“系统":在iOS上不可用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是cocos2d-x的新手,在编译项目时遇到此错误.

I'm new to cocos2d-x and while compiling my project I get this error.

调用不可用的功能系统":在iOS上不可用

Call to unavailable function 'system': not available on iOS

我看到此电话不再适用,但是我可以用什么来代替它呢?任何见识将不胜感激!

I see this call is no longer applicable but, what can I use to replace it? Any insight would be appreciated!

bool FileUtils::removeDirectory(const std::string& path)
{
#if !defined(CC_TARGET_OS_TVOS)
    std::string command = "rm -r ";
    // Path may include space.
    command += "\"" + path + "\"";
    if (system(command.c_str()) >= 0) /*System Call Error/Not Availible*/
        return true;
    else
        return false;
 #else
    return false;
#endif
}

推荐答案

系统功能在iOS 11上不可用使用此平均值,直到10月9日,我们可以拥有新的cocos2d-x 3.16

system function is not available on iOS 11 Use this mean while until Oct 9 we can have new cocos2d-x 3.16

如果(command.size()> = 0)

这篇关于调用不可用的功能“系统":在iOS上不可用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆