in your HelloWorld.cpp, try a simple test. Extend sdkbox::ChartboostListener and add in the callbacks and their functions and just try to make HelloWorld catch the events first and get it working properly.
So this is what we are using in our sample’s that we test with I removed a few function definitions that I know you don’t need. We extend Layer and not LayerColor, honestly I have not used LayerColor in more than a year, I think.
#ifndef __HELLOWORLD_SCENE_H__
#define __HELLOWORLD_SCENE_H__
#include "cocos2d.h"
#include "PluginChartboost/PluginChartboost.h"
class HelloWorld : public cocos2d::Layer, sdkbox::ChartboostListener
{
public:
// there's no 'id' in cpp, so we recommend returning the class instance pointer
static cocos2d::Scene* createScene();
// Here's a difference. Method 'init' in cocos2d-x returns bool, instead of returning 'id' in cocos2d-iphone
virtual bool init();
// implement the "static create()" method manually
CREATE_FUNC(HelloWorld);
//Ad callbacks
void onChartboostCached(const std::string& name);
bool onChartboostShouldDisplay(const std::string& name);
void onChartboostDisplay(const std::string& name);
void onChartboostDismiss(const std::string& name);
void onChartboostClose(const std::string& name);
void onChartboostClick(const std::string& name);
void onChartboostReward(const std::string& name, int reward);
void onChartboostFailedToLoad(const std::string& name, sdkbox::CB_LoadError e);
void onChartboostFailToRecordClick(const std::string& name, sdkbox::CB_ClickError e);
//Miscellaneous callbacks
void onChartboostConfirmation();
void onChartboostCompleteStore();
};
#endif // __HELLOWORLD_SCENE_H__