简体   繁体   English

没有sln文件时使用Visual Studio 2015打开解决方案/项目

[英]Opening Solution / Project with Visual studio 2015 when there is no sln file

I just downloaded open source code at github https://github.com/alextrevisan/SFML-LiquidFun-Water And, I opened visual studio 2015 and tried to open it but there is no such thing like .sln file.. In this situation how can I open the project?? 我刚刚在github https://github.com/alextrevisan/SFML-LiquidFun-Water下载了开源代码。然后,我打开了Visual Studio 2015并尝试打开它,但是没有.sln文件之类的东西。如何打开项目? and where am I supposed to locate all that files at. 我应该在哪里找到所有这些文件。 在此处输入图片说明

Try File->New->Project from existing code. 从现有代码尝试File-> New-> Project。 Then select the source folder and compile. 然后选择源文件夹并进行编译。

You may have to make a few selections in the wizard (such as whether it's a console app or if some dependencies are needed), depending on what the original code::blocks project had set. 您可能必须在向导中进行一些选择(例如,是否是控制台应用程序或是否需要一些依赖项),具体取决于原始代码::: blocks项目已设置的内容。 But if it's standard compliant C++, it should compile and run without any fancy compiler settings. 但是,如果它是符合标准的C ++,则应在没有任何高级编译器设置的情况下进行编译和运行。

As previously mentioned, the project you are trying to open in Visual Studio, is a Code::Blocks one. 如前所述,您试图在Visual Studio中打开的项目是一个Code :: Blocks。 So, I would suggest to you downloading CB 16.*, which is open source. 因此,我建议您下载CB 16. *,它是开源的。 In the Project's folder you can see: 在项目的文件夹中,您可以看到:

*.cbp: it is the principal file of the Project. * .cbp:它是项目的主体文件。 An XML: just open it or double click on it to open the Project (it will organise your headers and sources files as Visual Studio does). XML:只需打开它或双击它即可打开项目(它将像Visual Studio一样组织标题和源文件)。

*.layout: another XML. * .layout:另一个XML。

*.depend: it contains the header files included in the Project. * .depend:它包含项目中包含的头文件。

Review your header files and your source files to find out in which version of C++ the project has been developed (C++98? C++11?). 查看您的头文件和源文件,以了解开发该项目的C ++版本(C ++ 98?C ++ 11?)。

1) Goto Project > Build options... and check the version of C++ you want your Project to compile on, as shown in the below image: 1)转到项目>生成选项...,然后检查要在其上编译项目的C ++版本,如下图所示:

在此处输入图片说明

2) Then, goto Project > Properties... > Project's build options... and check again the version of C++ compiler. 2)然后,转到项目>属性...>项目的构建选项...,然后再次检查C ++编译器的版本。

[Note: This will work for your current project. [注意:这将适用于您当前的项目。 If you want to setup CB toolchain for all your future projects, then goto: Settings > Compiler > Compiler Settings, and check the corresponding box. 如果要为所有将来的项目设置CB工具链,请转到:设置>编译器>编译器设置,然后选中相应的框。 In Settings > Compiler > toolchain executables: you will find all the default executables, which you can change as per your own convenience.] 在“设置”>“编译器”>“工具链可执行文件”中:您将找到所有默认可执行文件,可以根据自己的方便进行更改。]

CB is a very easy to use tool, and can be installed both in Windows and Linux. CB是一个非常易于使用的工具,可以在Windows和Linux中安装。 Actually, if you google it, you will find information about how to build up your Box2D tool. 实际上,如果您在Google上进行搜索,则会发现有关如何构建Box2D工具的信息。

Please, check: http://box2d.org/forum/viewtopic.php?t=8159 请检查: http : //box2d.org/forum/viewtopic.php?t=8159

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM