recreating sln files for windows
eaglclaws opened this issue · 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?
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.
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.