简体   繁体   English

如何将Eclipse C ++项目移植到Visual Studio?

[英]How can I port an Eclipse C++ project to Visual Studio?

I have a very complicated project created in Eclipse as a Perforce project, converted to a C++ project. 我有一个非常复杂的项目在Eclipse中作为Perforce项目创建,并转换为C ++项目。 Is there a way to port the project to one or more Visual Studio 2013 Express projects? 是否可以将项目移植到一个或多个Visual Studio 2013 Express项目?

I found that I can drag a sub-directory from Windows Explorer directly into a MSVS filter. 我发现我可以将子目录从Windows资源管理器直接拖动到MSVS筛选器中。 Using that method, only .c , .cpp , .h , and .hpp files wind up in the filter. 使用该方法,只有.c.cpp.h.hpp文件会出现在过滤器中。 It is a big time saver over: 在以下方面可节省大量时间:

Right-click > Add > Existing Item (or Alt + Shift + A ), and then navigating and picking only the source and include files, one directory at a time. 右键单击>添加>现有项(或Alt + Shift + A ),然后仅浏览和选择源文件和包含文件,一次仅一个目录。

Disclaimer: This is really not a satisfactory solution because there are so many nested sub-directories and the need to update as files are modified. 免责声明:这确实不是一个令人满意的解决方案,因为有太多嵌套的子目录,并且需要在修改文件时进行更新。

If it is complicated in the sense it just have many source files but it produces a single executable then you could use the Visual Studio option to create a project from existing code. 如果从某种意义上讲它很复杂,它只有许多源文件,但是它生成一个可执行文件,则可以使用Visual Studio选项从现有代码创建项目。 Go to 'File', 'New', 'Project from existing code' and follow the wizard. 转到“文件”,“新建”,“从现有代码进行项目”,然后按照向导进行操作。 That should help if all source code is under relatively self-contained directories. 如果所有源代码都在相对独立的目录下,那应该会有所帮助。 From there, you would need to set the rest manually. 从那里,您需要手动设置其余部分。 If it is a complicated build process that generated many binaries then you would be out of luck. 如果这是一个复杂的生成过程,生成了许多二进制文件,那么您将很不走运。 Notice that if you can build from the command line then visual studio can act as an editor only. 请注意,如果您可以从命令行进行构建,则Visual Studio只能充当编辑器。

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

相关问题 如何将 CLion C++ 项目导入 Visual Studio? - How can I import a CLion C++ project into Visual Studio? 我可以在Visual Studio中的单个项目中混合使用C ++和C吗? - Can I mix C++ and C in a single project in Visual Studio? 如何将项目从Visual C ++ 6.0转换为Visual Studio Express 2010? - How can I convert a Project from Visual C++ 6.0 to Visual Studio Express 2010? 我可以在 MAC 上打开现有的 Visual Studio 项目 (C++) 吗? - Can I open an existing Visual Studio Project (C++) on MAC? 如何创建一个使用CLR混合C和C ++的Visual Studio项目? - How can I create a single Visual Studio project that mixes C and C++ using CLR? 如何在Visual Studio 2010中构建这个简单的C ++ / SWIG / C#项目? - How can I build this simple C++/SWIG/C# project in Visual Studio 2010? 最简单的方法是“移植”Visual Studio C ++项目以在Linux上编译? - Easiest way to “port” a Visual Studio C++ project to compile on Linux? 如何在Visual Studio Visual C ++ Win32项目中查看主窗体,以便编辑它? - How can I view the main form in a Visual Studio Visual C++ Win32 Project so I can edit it? 我应如何在C ++ Visual Studio Project中包括Bond? - How Should I Include Bond in C++ Visual Studio Project? 如何在 Visual Studio 中打开 C++ 项目文件夹? - How do I open a c++ project folder in visual studio?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM