本文介绍了用于c ++多平台项目的工具的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用一个c ++多平台项目使用visual studio 2010,所有平台之间有一个共享的代码部分,但有一个很大的部分,致力于每一个,我使用#if def分隔,但是事实证明,代码维护变得非常,虽然代码是杂乱的,除了像代码的问题不编译与一些定义打开或关闭。

I am working with a c++ multi-platform project using visual studio 2010, there is a shared portion of code among all platforms, but there is a big portion that is dedicated to each one, I separate them using #if def, but it turns out that code maintenance become very though and the code is cluttered, in addition to problems like code does not compile with some defines turned on or off.

有任何Visual Studio的插件或工具,有助于开发多平台项目,例如隐藏与平台相关的代码,或使用不同的#defines打开/关闭,检查数据类型等..

Is there any plugin or tool for visual studio that helps in developing multi-platform projects, for example hide code related to platform, or compile using different #defines turned on/off, check data types, .. ect.

如果有任何建议,我将不胜感激。

I would be grateful if any one have a suggestion

推荐答案

插件VS,但由于它基本上是一个只有Windows的IDE,我怀疑有没有。 (但当然我可能错了)

I do not know about such a plugin for VS, but since it's basically a Windows-only IDE, I doubt there are any. (But of course I could be wrong)

如果你正在寻找一个很好的跨平台构建系统,我会看看。它是强大的,容易拿起,可以生成构建文件几乎任何流行的IDE /工具链(Visual Studio解决方案,Eclipse项目,MinGW Makefile,GNU Makefile等)。

If you're looking for a good cross-platform build system, I'd look to CMake. It's powerful, easy to pick up and can generate build files for almost any popular IDE/toolchain (Visual Studio Solutions, Eclipse Projects, MinGW Makefiles, GNU Makefiles, etc).

它使大型项目的跨平台开发变得轻而易举!

It makes cross-platform development of larger projects a breeze!

这篇关于用于c ++多平台项目的工具的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-20 00:44