分享给其他朋友
xcode 4  cocos2d  第三章  编译错误 的解决办法

file://localhost/users/Ishaq/Projects/game01/libs/cocos2d/CCLayer.m: error: Semantic Issue: Sending 'ccColor4B' (aka 'struct _ccColor4B') to parameter of incompatible type 'CIColor *'

the code that throws this error is below (from cocos2d-iphone CCLayer.m):

+ (id) layerWithColor:(ccColor4B)color
{
     return [[[self alloc] initWithColor:color] autorelease];
}
改为下面的即可
return [[(CCColorLayer*)[self alloc] initWithColor:color] autorelease];