如何从 Eclipse CDT 打开 vcproj 文件?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/3449805/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to open a vcproj file from Eclipse CDT?
提问by Nielk
I know, the question has already been askedbut the answer doesn't meet my requirements.
我知道,这个问题已经有人问过了,但答案不符合我的要求。
So is there is any way to import a Visual Studio project with all its parameters in Eclipse CDT ? If yes, how could I do that ?
那么有什么方法可以在 Eclipse CDT 中导入带有所有参数的 Visual Studio 项目?如果是,我该怎么做?
If you want to know more details about my situation, there it is :
如果您想了解有关我的情况的更多详细信息,请访问:
I am joining a rather big collaborative C++ project, with a complex repository and many sub-projects. Each of these sub-projects was initially developed with Visual Studio, and the parameters of the build chain are stored in a vcproj file.
我正在加入一个相当大的协作 C++ 项目,它有一个复杂的存储库和许多子项目。这些子项目中的每一个最初都是用 Visual Studio 开发的,构建链的参数存储在一个 vcproj 文件中。
Yet, I strongly resent the use of Visual Studio, am more efficient with Eclipse CDT, and don't have access to a Windows machine, so I would be really happy to not loose weeks in order to understand the whole building process...
然而,我强烈反对使用 Visual Studio,使用 Eclipse CDT 效率更高,并且无法访问 Windows 机器,所以我真的很高兴不花几周时间来了解整个构建过程......
回答by Dat Chu
With the risk of being a detracted answer from your question, I believe that the solution is NOT to convert a vcproj to an EClipse CDT project. You should use a better build toolchain (e.g. CMake). Once such a toolchain is in place, you can create a Visual Studio project, an EClipse CDT project, a QtCreator project, a XCode project, ... from the same build configuration files.
冒着从您的问题中贬低答案的风险,我认为解决方案不是将 vcproj 转换为 EClipse CDT 项目。您应该使用更好的构建工具链(例如 CMake)。一旦有了这样的工具链,您就可以从相同的构建配置文件创建 Visual Studio 项目、EClipse CDT 项目、QtCreator 项目、XCode 项目……。
That way, when the next IDE for C++ comes along, nobody will be wasting their time converting project files.
这样,当下一个 C++ IDE 出现时,没有人会浪费时间转换项目文件。
回答by Benoit Miller
I think you're asking the wrong question. As you've found, the .vcproj describes the build process (in addition to the list of files), and that strongly depends on the MS compiler toolchain being available.
我认为你问错了问题。如您所见,.vcproj 描述了构建过程(除了文件列表),这在很大程度上取决于可用的 MS 编译器工具链。
A better alternative (though harder to implement late in the lifetime of a project) is to use free tools such as Premakeand JamPlus(just to name a few) to decouple the list of files from the build process. This is especially useful for multiplatform projects, as each developer can use their preferred editor and toolchain to contribute to the project.
一个更好的替代方案(虽然在项目生命周期后期更难实现)是使用免费工具,例如Premake和JamPlus(仅举几例)将文件列表与构建过程分离。这对于多平台项目尤其有用,因为每个开发人员都可以使用他们喜欢的编辑器和工具链为项目做出贡献。
That being said, I do believe Visual Studio can run under Wine... ;)
话虽如此,我确实相信 Visual Studio 可以在 Wine 下运行...;)