cocos2d / cocos2d-x

Cocos2d-x is a suite of open-source, cross-platform, game-development tools utilized by millions of developers across the globe. Its core has evolved to serve as the foundation for Cocos Creator 1.x & 2.x.

Home Page:https://www.cocos.com/en/cocos2d-x

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

recreating sln files for windows

eaglclaws opened this issue · comments

It appears when one makes a new project using cocos new on mac or linux the sln files for win32 are omitted, resulting in the project unfit for building on windows. Is there a way to recreate the sln without making a new project on windows and copying the files?

commented

Which version of cocos2d-x are you using?

If it's v3.17+ or v4, then to save yourself a lot of trouble, you should be using cmake for everything. When you use cmake, you only generate the build folder (with the Visual Studio solution files) only when you need to, and you don't commit them to your source control either. This way you don't need to copy the project build files across, you just generate them when you need them.

v4, And just as you said, after using cmake for compiling, everything turned out fine. Thank you.

For anyone who finds this thread in the future:
Assuming you are using MSVC2019

cd win-build
cmake .. -A win32
cmake --build . --config Release

is what I did to compile. -A win32 is crucial because for some reason cocos does not play well with 64bit systems as of writing this. Probably will become obsolete in the future.

commented

is what I did to compile. -A win32 is crucial because for some reason cocos does not play well with 64bit systems as of writing this. Probably will become obsolete in the future.

@eaglclaws Cocos2d-x doesn't have 64-bit support for Windows. If you need that, then check out this fork of Cocos2d-x v4, which had 64 bit support added quite a while back.

Cool, thanks for clarifying.