英文:
There is no sln file in proj.win32
问题
我刚刚安装了cocos2d-x,并使用以下命令创建了一个新项目:cocos new ProjectName -l cpp。它没有出现任何错误,但当我检查proj.win32文件夹时,没有.sln文件。我该如何打开这个项目?或者为什么没有.sln文件?
proj.win32文件夹的内容如下图所示:
英文:
I just installed cocos2d-x and created a new project using this command line : cocos new ProjectName -l cpp. It created with no errors but when i check proj.win32 folder, there was no .sln file. How can I open up this project? Or why there is no sln file?
Here is what proj.win32 folder looks like:
答案1
得分: 3
你做得正确。只是创建一个新项目并没有.sln文件。
既然你想要.sln文件,这意味着你想要使用一个集成开发环境(IDE)。如https://github.com/cocos2d/cocos2d-x#using-ide中所述,需要安装cmake以使用IDE。
如果你没有安装cmake,请从https://cmake.org/download/下载并安装它。
安装完成后,前往proj.win32目录:
cd ProjectName/proj.win32
然后运行以下命令:
cmake ..
.sln文件应该会被创建。
英文:
You did it correctly. There is no .sln file just from creating a new project.
Since you want .sln file, it means you want to use an IDE. As noted in https://github.com/cocos2d/cocos2d-x#using-ide, cmake is required in order to use IDE.
If you don't have cmake installed, download it from https://cmake.org/download/
After you have it installed, go to the proj.win32:
cd ProjectName/proj.win32
Then, run the following command:
cmake ..
The .sln file should be created.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论