9
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Xcode9.0.0のCCFileUtils.cppででたエラーの対処法

Last updated at Posted at 2017-10-11

Xcodeのバージョンを9.0.0にした時に出たので一応記録しておきます

removeDirectory
{
    if (path.size() > 0 && path[path.size() - 1] != '/')
    {
        CCLOGERROR("Fail to remove directory, path must terminate with '/': %s", path.c_str());
        return false;
    }

    std::string command = "rm -r ";
    // Path may include space.
    command += "\"" + path + "\"";
    if (system(command.c_str()) >= 0)  //この行でエラーが発生!!
        return true;
    else
        return false;
}

エラーの内容は
Call to unavailable function 'system': not available on iOS

以下のリンク先を参考にしたらうまくいきました。
https://github.com/spaceinch/cocos2d-x/commit/96c3061928af2536f969caf6ab00572c873a54ec

9
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
9
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?