Cocos2dx replacescene error

Scenario I have main scene and I click this button I want to open another scene. But I am getting following error : undefined reference to ’OyunMenu::scene()

MainMenu.h

`#ifndef MAINMENU_H_
#define MAINMENU_H_

#include “cocos2d.h”

class MainMenu : public cocos2d::CCLayer
{
public:

virtual bool init();

static cocos2d::CCScene* scene();
virtual void registerWithTouchDispatcher(void);
virtual void ccTouchesBegan(cocos2d::CCSet* touches, cocos2d::CCEvent* event);
virtual void ccTouchesMoved(cocos2d::CCSet* touches, cocos2d::CCEvent* event);
virtual void ccTouchesEnded(cocos2d::CCSet* touches, cocos2d::CCEvent* event);
virtual void ccTouchesCancelled(cocos2d::CCSet* touches, cocos2d::CCEvent* event);

void menuCloseCallback(CCObject* pSender);

CREATE_FUNC(MainMenu);

};

#endif`

MainMenu.cpp

`#include “MainMenu.h”
#include “SimpleAudioEngine.h”
#include “Constants.h”
#include “OyunMenu.h”

#define COCOS2D_DEBUG 1

using namespace std;
USING_NS_CC;

CCScene* MainMenu::scene()
{
// ‘scene’ is an autorelease object
CCScene *scene = CCScene::create();

// ‘layer’ is an autorelease object
MainMenu *layer = MainMenu::create();

// add layer as a child to scene
scene->addChild(layer);

// return the scene
return scene;
}

bool MainMenu::init()
{
//////////////////////////////
// 1. super init first
if ( !CCLayer::init() )
{
return false;
}

this->setTouchEnabled(true);

CCSprite* oyuncuBul = CCSprite::create(“oyuna-basla.png”);
oyuncuBul->setPosition(ccp(150,260));
oyuncuBul->setTag(menuOyuncuBul);
this->addChild(oyuncuBul, 0);
}

void MainMenu::ccTouchesBegan(cocos2d::CCSet* touches, cocos2d::CCEvent* event)
{

CCTouch touch = (CCTouch) (touches->anyObject());
CCPoint point = touch->getLocationInView();
point = CCDirector::sharedDirector()->convertToGL(point);

CCSprite *oyuncuBul=(CCSprite *)this->getChildByTag(menuOyuncuBul);

CCRect rectOyuncuBul = oyuncuBul->boundingBox();

if(rectOyuncuBul.containsPoint(point)){
CCDirector::sharedDirector()->replaceScene(OyunMenu::scene());
}`

OyunMenu.h

`#ifndef OYUNMENU_H_
#define OYUNMENU_H_

#include “cocos2d.h”

class OyunMenu : public cocos2d::CCLayer
{
public:
virtual bool init();

static cocos2d::CCScene* scene();
virtual void registerWithTouchDispatcher(void);
virtual void ccTouchesBegan(cocos2d::CCSet* touches, cocos2d::CCEvent* event);
virtual void ccTouchesMoved(cocos2d::CCSet* touches, cocos2d::CCEvent* event);
virtual void ccTouchesEnded(cocos2d::CCSet* touches, cocos2d::CCEvent* event);
virtual void ccTouchesCancelled(cocos2d::CCSet* touches, cocos2d::CCEvent* event);

void menuCloseCallback(CCObject* pSender);

CREATE_FUNC(OyunMenu);

};

#endif `

OyunMenu.cpp

`#include “OyunMenu.h”
#include “SimpleAudioEngine.h”
#include “Constants.h”

#define COCOS2D_DEBUG 1

using namespace std;
USING_NS_CC;

CCScene* OyunMenu::scene()
{
// ‘scene’ is an autorelease object
CCScene *scene = CCScene::create();

// ‘layer’ is an autorelease object
OyunMenu *layer = OyunMenu::create();

// add layer as a child to scene
scene->addChild(layer);

// return the scene
return scene;
}

// on “init” you need to initialize your instance
bool OyunMenu::init()
{
//////////////////////////////
// 1. super init first
if ( !CCLayer::init() )
{
return false;
}
}`

Android platform?Do you add “OyunMenu.cpp” to “LOCAL_SRC_FILES” at Android.mk.

I’d get rid of the scene() methods and just inherit CCScene instead of CCLayer. They should also go away from the helloword.
Then you only need to do: director->replaceScene(OyunMenu::create())

Hi added “OyunMenu.cpp” to “LOCAL_SRC_FILES” at Android.mk and Problem FIXED.
Thanks