Problem with building cocos2d-x multiplatform

Problem with building cocos2d-x multiplatform
0.0 0



I have done what You have written, go through the few tasks needed to compile cocos2d-x multiplatform in Xcode. (but I had to think about some problems - for example there was no “Context menu > “Add> New Target”, there was only Project~~>New Target…)
I am stack in this point:
“3.3 Config target info of cocos2d-x”~~ OK. Build Targets->cocos2d-x, you’ll successfully get the libcocos2d.a now
The project wasn’t built successfully. I have 65 errors and 14 warnings!
For example this error:

  1. QuartzCore/CVDisplayLink.h No such file or directory. (and I didn’t find this file in the project really…)

Please, help me.


So sorry I forget to update the document.
cocos2d-x have templates for xcode now. You can download the 0.7.2 version, and run

sudo ./

just like using cocos2d-iphone. Using templates may help you to make it easy, and skip the errors.

The document is updated now. Plz ref to Create a new cocos2d-x project for iOS using templates


Thanks, it worked! :slight_smile:


Hi, I tried using the template, but it doesn’t show up in XCode 3.2.5. If I try to build manually, I get the same errors with “QuartzCore/CVDisplayLink.h” etc. Any idea why the script doesn’t work for XCode 3.2.5? Also what headers / paths do I need to add for QuartzCore? I added the ones you specified in the tutorial.
Thank you.


Strange. Where You searched for this template in X-Code?That is nothing strange that You have errors when building, I had the same problem (and I hadn’t solved it in this way… I installed all by template).


I tried creating a new project in XCode, but the Cocos2DX template was not there (just the standard templates, iOS and MacOS applications).

EDIT: I fixed the templates. The problem was the permissions for the templates folder. My mistake was I unpacked cocos2dx zip in Windows, then copied the unpacked folder to MacOS - however the permissions were wrong. So XCode (or Finder) couldn’t open the templates folder.
I deleted the templates folder in /Library/Application Support/Developer/Shared/Xcode, copied the zip file to MacOS and then unpacked it there and now it shows up in XCode.
Alternatively, I guess I could just chmod the templates folder… but I prefered the “clean” way.