Programmer's guide samples - failed to open?

I wanted to try out the Programmer’s Guide Samples and went to GitHub - chukong/programmers-guide-samples: Programmers Guide Samples to download it. I have done the following steps:

$ cd programmers-guide-samples/cpp
$ git clone GitHub - cocos2d/cocos2d-x: Cocos2d-x is a suite of open-source, cross-platform, game-development tools used by millions of developers all over the world. cocos2d
$ cd cocos2d
$ git checkout v3.10
$ git submodule update --init
$ download-deps.py

Then, when I try to to open the visual studio sln file in the cpp/proj.win10 folder, it says “One or more projects in the solution were not loaded correctly. Please see the Output window for details.” I have tried to open the file as administrator, but did not work. Somehow, even though I have the framework in the libs folder, nothing is found when opening the sln file. Everything that otherwise should hold something is empty.


How can I fix this?

Here is the output:

E:\cocos2d-x-3.17\Programmer’s guide\programmers-guide-samples-3.10\cpp\cocos2d\external\Box2D\proj-win10\libbox2d.vcxproj : error : Project “E:\cocos2d-x-3.17\Programmer’s guide\programmers-guide-samples-3.10\cpp\cocos2d\external\Box2D\proj-win10\libbox2d.vcxproj” could not be found.

Project ‘libSpine’ could not be loaded because it’s missing install components. To fix this launch Visual Studio setup with the following selections:
Microsoft.VisualStudio.ComponentGroup.UWP.VC
Microsoft.VisualStudio.Component.Windows10SDK.10240

E:\cocos2d-x-3.17\Programmer’s guide\programmers-guide-samples-3.10\cpp\cocos2d\cocos\editor-support\spine\proj.win10\libSpine.vcxproj : error : The application for the project is not installed.

Project ‘libcocos2d’ could not be loaded because it’s missing install components. To fix this launch Visual Studio setup with the following selections:
Microsoft.VisualStudio.ComponentGroup.UWP.VC
Microsoft.VisualStudio.Component.Windows10SDK.10240

E:\cocos2d-x-3.17\Programmer’s guide\programmers-guide-samples-3.10\cpp\cocos2d\cocos\2d\libcocos2d_win10\libcocos2d.vcxproj : error : The application for the project is not installed.

E:\cocos2d-x-3.17\Programmer’s guide\programmers-guide-samples-3.10\cpp\proj.win10\App\test.vcxproj : warning : The build tools for Visual Studio 2015 (v140) cannot be found. To build using the Visual Studio 2017 (v141) build tools, either click the Project menu or right-click the solution, and then select “Retarget Solution”. Install Visual Studio 2015 (v140) to build using the Visual Studio 2015 (v140) build tools.

Project ‘test’ could not be loaded because it’s missing install components. To fix this launch Visual Studio setup with the following selections:
Microsoft.VisualStudio.ComponentGroup.UWP.VC
Microsoft.VisualStudio.Component.Windows10SDK.10240

E:\cocos2d-x-3.17\Programmer’s guide\programmers-guide-samples-3.10\cpp\proj.win10\App\test.vcxproj : error : The application for the project is not installed.

Btw. I have in fact tried what is said in the output, but it does not change the fact that the project is empty.

I’m not sure if we support the programmer guide samples on Windows. At least I haven’t tested in a while

I’m testing windows stuff for a few other users I can test these too and see what shape they are in.

I got those to run with 3.17 on Win32, see my GitHub repo. Submitted a PR. Haven’t tested on UWP, though.

1 Like

Thanks George :slight_smile:

So you got a project up running correctly on windows? :confused:

Yes, with VS2015 32-bit on Windows 8.1 and with a couple of twists:

  • I only used Visual Studio for building, because I prefer to code on Qt Creator
  • I don’t use the cocos Python script because it uses a lot of disk space and takes a long time to build, since it copies the full source code for the whole library for every new project (which makes the first build of the new project take quite a while); I start from an empty Qt Creator project that points to my prebuilt library files. It works well for Win32, but if I were coding for Android or iOS I would stick to cocos.