CFileUtils usage


Hello, I’ve configured sample project, it builds and runs fine. Now I want to use some files functionality:

#include “cocos2d.h”
#include “platform/CCFileUtils.h”
void Foo()
CCFileUtils()::sharedFileUtils()->fullPathFromRelativeFile(" … ");

error: ‘CFileUtils’ was not declared in this scope

And IDE (eclipse) opens that file without troubles (so it opens and is visible for compiler), but why doesn’t it see the class declaration)?


Maybe, because the namespace information is missing?
What about this…

#include "cocos2d.h" 
#include "platform/CCFileUtils.h"


void Foo() {
    CCFileUtils::sharedFileUtils()->fullPathFromRelativeFile(" ... ");



Yeah, it was stupid :slight_smile: Also, CCFileUtils() should be without braces, error otherwise due to abstract class. Thank you.