I am stuck with CCScale9Sprite, can not pass compile shit.

I am stuck with CCScale9Sprite, can not pass compile shit.
0.0 0


hi budy:

i just get CCScale9Sprite.h & CCScaleSprite.cpp from github, and add this 2 file to my new project.
i meet a strange compile error:

I use this way to construct a CCScaleSprite object

CCScale9Sprite sp = CCScale9Sprite::spriteWithFile;
I think this 2 line is no wrong, i got misunderstand, please help.
Undefined symbols for architecture i386:
“CCScale9Sprite::spriteWithFile(char const
)", referenced from:
HelloWorld::init in HelloWorldScene.o
ld: symbol not found for architecture i386
clang: error: linker command failed with exit code 1

#include “HelloWorldScene.h”
#include “SimpleAudioEngine.h”
#include “CCScale9Sprite.h"
using namespace cocos2d;
using namespace CocosDenshion;
CCScene** HelloWorld::scene()
// ‘scene’ is an autorelease object
CCScene scene = CCScene::node;
// ‘layer’ is an autorelease object
layer = HelloWorld::node();
// add layer as a child to scene
// return the scene
return scene;
// on”init” you need to initialize your instance
bool HelloWorld::init
// 1. super init first
if )
return false;
CCScale9Sprite**sp = CCScale9Sprite::spriteWithFile(“Icon.png”);

return true;


ok, i got it, place a wrong path, sorry:)