[SOLVED]Incomplete Type error with CCRibbon

Hi All

I’m trying to port some code from cocos2d obj-c to cocos2d-x. So far everything has been fairly straightforward but I’ve hit a problem with CCRibbon that I don’t understand (my c++ skills are poor but growing daily!)
Creating sprites, layers etc has all been fine - just this CCRibbon error stumping me.

In my code I get:
Error: incomplete type ‘cocos2d::CCRibbon’ used in nested name specifier
.h File:
cocos2d::CCRibbon **ribbonBlue;
.cpp File:
ribbonBlue = CCRibbon::ribbonWithWidth,4);

I also get an error in CCMotionStreak.h
Error: forward declaration of ‘struct cocos2d::CCRibbon’
CCMotionStreak.h File:
……
namespace cocos2d {
class CCRibbon;
/***
* @brief CCMotionStreak manages a Ribbon based on it’s motion in absolute space.
……

I know the definition of the error is “An incomplete type declaration describes the object, but lacks the information needed to determine the object’s size” but have very little clue what this actually means or how to solve it.

Any pointers or assistance would be greatly appreciated!

Thanks

Matt

Don’t worry - I fixed by including CCRibbon.h in the .cpp file - I sort of assumed it would have been included already via the cocos2d.h file, but obviously not!

Thanks anyway.