Cocos2dX Intall issues


I didn’t see a forum dedicated to software issues so I decided to post here. I recently started learning to use Xcode and Cocos2d. I installed Cocos2D no problem. I recently got a book about Cocos2dX and decided to download and install that.

In the book it says to install it in terminal by going to the folder and typing sudo ./ -u, similar to installing Cocos2D. When I do this it asks for my password. When I confirm, it tells me “sudo: ./ command not found.” I also removed the old cocos2d templates, but they still show up in Xcode. I uninstalled and reinstalled xcode and they are still there.

If anyone can help me to install Cocos2DX properly so I can continue my education, that would be great.


which version of cococs2d-x are trying to install?? the templates way of intstalling only works till version 2.15. you can even drag the file from the folder to the terminal. Also are you in the cocos2d-x root folder?


I was in version 2.2.1, but realized the book was about 2.0.4 just now. 2.1.4 Installed fine with the install line in terminal. Is it hurting me by using an old version? Also, yes I was in the cocos2d-x root folder.


i have not delved much into 2.2 … quite happy with 2.15 as of now. There is a downside in 2.2, unlike 2.15 you cant move your project folder around.


I downloaded 2.2.1 and have the exact same problem. Only I never install cocos2D before. It keeps telling me command not found and I can’t find any solution out there. If anyone can help that’ll be great


In case of 2.2 and above (as of now) you have to go to where you unzipped cocos2d-x folder in the terminal, then go to tools, and then to project-creator folder then type the following to create a project .

./ project PROJECTNAMEpackage com.example.PROJECTNAME -language cpp

A new project would have been created in the projects folder with folder name PROJECTNAME. The projects folder is in the main folder where you unzipped cocos2d-x to.

Then you can go to proj.ios and open the xcode project to open the project in xcode.