How to build Cocos game environment tutorial on Windows10 system

  
 Microsoft has recently officially launched a new generation of cross-platform and device



10, and the Cocos engine is also available for the first time on the Windows
10 platform. Strong support. Currently using the latest Cocos2d-x 3.7 version of the official website has been able to develop games based on the general application architecture of the Windows
10 platform. The following is to share with you how to build a Cocos game environment for the development of Windows
10.

First, the development environment
First, developers must upgrade the system to the Windows 10 RTM version (nonsense).
Then of course, Visual Studio 2015 is installed, and the official community version is currently available.
Microsoft official website: https://www.visualstudio.com/downloads/download-visual-studio-vs
It is important to note that you must install the Windows10 SDK, which is the option to check the yellow box below.

2. HelloWorld Engineering
1. Download the latest Cocos2d-x code from the official website (3.7.1)
2. After decompressing, use the Cocos new command to create a new project. The directory of proj.win10 can be found in the project directory, which proves that the Cocos engine already supports the Windows10 platform.

3. Open the Win10 project, but unfortunately this new project is compiled. The error message is as follows:
1>C:\\ProgramFiles(x86)\\MSBuild\\Microsoft.Cpp\\v4.0\\V140\\ApplicationType\\WindowsStore\\10.0\\Platforms\\x64\\PlatformToolsets\\v140\\Toolset.targets(41,5 ):error:TheWindowsSDKversion(10.0.0.0)wasnotfound.InstalltherequiredversionofWindowsSDKorchangetheSDKversionintheprojectpropertypagesorbyright-clickingthesolutionandselecting'Retargetsolution'
4. Modify the project settings to make the project compile:
The reason why the project fails to compile is mainly due to the faster update speed of Win10SDK. The SDK version of Cocos's Win10 project is older than the SDK version of the VS2015 installation. Fixing this problem is relatively simple. It is recommended that you follow the following two steps:
1) Reproject all the projects under the project, including libbox2d, libbullet, librecast, libSpine, libCocos2d and the game itself, to the latest SDKversion.

2)Replace the WindowsPhone reference under the game project as WindowsPhoneExtensionforUWP


I hope that everyone can successfully run and develop Cocos games on Windows10 through the above steps, and welcome everyone to This brand new platform offers more and more excellent game pieces!

Copyright © Windows knowledge All Rights Reserved