# How to set up Cocos2d-x for visual studio?

I want to make a cocos2d-x game. I read you can use any IDE, so I was planning to use Microsoft Visual Studio 2015, since I want to make my game primarily for Windows. I have been searching for tutorials, but i couldn't find any. It'd be great if someone wrote a step-by-step guide on how to set it up.

• Have you tried downloading the VS solution and compiling it like explained here cocos2d-x.org/wiki/Win32_Installation_and_Setup ? Oct 6 '15 at 8:38
• I made a tutorial some time ago. Jan 11 '19 at 21:00
• @PaweX3 Please avoid posting link-only answers. You can create a new answer if you feel like adding more details to it, so that users don't need to visit external resources. (Links are fine if they're not the core of the answer.) Jan 11 '19 at 21:05

Follow the steps in this video for setup.

After you do all the steps in the video (you may need to restart here) run this command from the command line to create a new Cocos2d-x project:

cocos new GameNameHere -p com.MyCompany.GameNameHere -l cpp -d path/to/project

It's better not to use spaces in the names that you choose.

Go to the project directory that you choose and open it, where you should find:

Classes
cocos2d
proj.android
proj.android-studio
proj.ios_mac
proj.linux
proj.win8.1-universal
proj.win10
proj.win32
Resources
.cocos-project.json
CMakeLists.txt


Open the proj.win32 folder and go to a file named YourGameName.sln, where YourGameName should match the name you chose earlier.

Finally, just run the project and your done.