Cocos2d-x v4.0 Hello World build failing to run in Debug

OS: Windows 7 Professional (64 bit)
Cocos2d-x version: 4.0
Cmake version: 3.17.0
Using Visual Studio Community 2017 Version 15.9.21

Steps I take to reproduce the issue:

  • cocos new Test -l cpp
  • cd Test\proj.win32
  • cmake … -G"Visual Studio 15 2017" -Tv141 -A win32
  • Run build Solution in Visual Studio, and get “16 succeeded, 0 failed, 0 skipped”

Running the Local Windows Debugger for win32, I get the error:
“Unable to start program
‘E:\PATH_TO_TEST\proj.win32\Debug\ALL_BUILD’.
The system cannot find the file specified.”

Let me know if there is any other information I can provide that would help. I’m new to Cocos2d-x, so not sure what else might be useful. Thanks for any help!

The “ALL_BUILD” project should not be the start-up project. The correct project should be the one you created with the name “Test”, so in the Solution Explorer, right click on that project in the solution, and set it as the start-up project.

2 Likes

@R101 Perfect, this was the solution. Thanks!

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.