Windows Installation and Setup


A supported environment. See Installation Prerequisites

Setting up Cocos2d-x

  • Download Cocos2d-x and unzip it. (maybe: ~/)

  • Make sure you have a working environment see Prerequisites above. This means a working Python, having run /> and updated your $PATH.

Compile and run the cpp-tests project

  • Open cocos2d-win32.vc2012.sln in the build folder

  • Right click the TestCpp project, and select Set as StartUp Project.

  • Compile and run the TestCpp project.

Starting a new project

Once everything above works, you can start a new project! To do this, read our document on the Cocos Command-line tool.

Distributing a Cocos2d-x app on Windows

Note: this falls outside of the realm of Cocos2d-x. Please consult Microsoft resources for assistance.

If you try to run a game created with Cocos2d-x on a non-development machine, it may be required for this machine to have the Visual Studio runtime installed. The easiest way is to create an installer for your game, but it is possible to do it without by installing all required pieces manually.

  • Use Dependency Walker to check what DLLs your game requires.

  • Install the required Visual Studio runtime. Microsoft has now merged VS2015, 2017 and 2019 runtimes into one, which you can find here.

For the installer, check these posts:

  • InnoSetup (also shows you a sample for how to install the VS C++ runtime using it).

  • Sample InnoSetup script for Cocos2d-x here.


Please see this F.A.Q for troubleshooting help.

results matching ""

    No results matching ""