ios - xcode4 parameter of incompatible type -
a project runs fine on xcode3, fails compile on xcode4 error:
file://localhost/users/ishaq/projects/game01/libs/cocos2d/cclayer.m: error: semantic issue: sending 'cccolor4b' (aka 'struct _cccolor4b') parameter of incompatible type 'cicolor *'
the code throws error below (from cocos2d-iphone cclayer.m
):
+ (id) layerwithcolor:(cccolor4b)color { return [[[self alloc] initwithcolor:color] autorelease]; }
somehow xcode thinks code calling - (id)initwithcolor:(cicolor *)color;
of ciimage
(inside ciimage.h
). how can set xcode's brain straight? ;-)
i've got same problem. resolution explicitly cast proper type helps compiler find proper class. code looks this:
return [[(cccolorlayer*)[self alloc] initwithcolor:color] autorelease];
Comments
Post a Comment