Cocos V4 CMake Visual Studio Build Problem

I tried to implement it by watching the video of @SonarSystems, but I am getting such an error.

image

I removed ALL_BUILD in CMakePredefinedTargets and I get this error.

Thanks.

You shouldn’t be removing “ALL_BUILD”. Simply right click on the correct project in the solution (with the name you chose, in your case it seems to be “example”), and select it to be the start-up project. That’s all you need to do.

Check this post for a screenshot of the exact steps: https://discuss.cocos2d-x.org/t/all-build-when-i-run-the-project-i-get-this-error/49281/2

2 Likes

Thank you. It works.

Thanks for sharing, good to know.

What are the consequences on removing ALL_BUILD project, so far I haven’t had any problems?

It shouldn’t affect anything, since it’s just a project that forces a rebuild of (almost) everything. Removing it from your project did have the side-effect of fixing the issue you came across in your tutorial, but it was more luck than anything else, since Visual Studio simply picked one of the other projects in the solution to set as the start-up project. If Visual Studio picked the wrong project, then it would result in the same problem.

The actual cause of that issue is simply to select which project you want to start-up, so perhaps it would be beneficial to reflect that in your tutorial.

There is some info here about the purpose of the BUILD_ALL and ZERO_CHECK projects.

Thanks for sharing

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