cocos2d-x icon indicating copy to clipboard operation
cocos2d-x copied to clipboard

recreating sln files for windows

Open eaglclaws opened this issue 3 years ago • 4 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?

eaglclaws avatar May 09 '22 12:05 eaglclaws

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.

rh101 avatar Jun 08 '22 03:06 rh101

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.

eaglclaws avatar Jun 08 '22 15:06 eaglclaws

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.

rh101 avatar Jun 09 '22 00:06 rh101

Cool, thanks for clarifying.

eaglclaws avatar Jun 09 '22 04:06 eaglclaws