Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Issue With Enabling ARC in COCOS2D

im following steps from

http://www.raywenderlich.com/23854/arc-and-cocos2d-v2-x

i can not set -fno-objc-arc for ccCArray.h ... even if i have set -fno-objc-arc to that file , compiler gives warnings and errors related to ARC... like

[WARN]warning: no rule to process file 'libs/cocos2d/Support/ccCArray.h' of type sourcecode.c.h for architecture i386

ARC forbids explicit message send of 'release'

what's wrong??

like image 477
BaSha Avatar asked Mar 22 '26 03:03

BaSha


1 Answers

That is a header file, and no header files should be compiled. You normally include <file>.h inside your <file>.m.

To fix this, click on your project in Xcode, select your target and then check that this file is not present in the Build Phases tab. Also make sure you don't have any other <file>.h in there.

Clean and build the project.

like image 146
Calin Avatar answered Mar 23 '26 19:03

Calin



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!