什么是最流行的通用 C++ 框架?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/2669771/
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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-28 00:17:02  来源:igfitidea点击:

What is the most popular general purpose C++ framework?

c++frameworks

提问by Kyle Rozendo

I was looking at Qt and came to wondering, what is the most popular general purpose C++ framework, and what are some pros and cons of it?

我在看 Qt 并想知道什么是最流行的通用 C++ 框架,它有哪些优点和缺点?

回答by Hank Gay

The STLand Boostare both pretty popular, and they're pretty much the epitome of "general purpose".

STL加速都非常受欢迎,他们几乎的“通用”的一个缩影。

回答by Stu Mackellar

Qtis very popular. It's available under open-source (LGPL) and commercial licenses, has fully-featured core and GUI class libraries and an integrated IDE and build system. It's also cross-platform.

Qt很受欢迎。它在开源 (LGPL) 和商业许可下可用,具有功能齐全的核心和 GUI 类库以及集成的 IDE 和构建系统。它也是跨平台的。

It's under very active development and has a new declarative UI library (QtQuickincluding QML) due in the next release (4.7).

它正在非常活跃的开发中,并且在下一个版本 (4.7) 中有一个新的声明式 UI 库(QtQuick包括QML)。

Definitely worth checking out for new projects.

绝对值得检查新项目。

For Windows-only work MFCis still worth a look. It's recently been updated.

对于仅适用于 Windows 的工作,MFC仍然值得一看。它最近被更新了。

回答by Clifford

The question as it stands is probably unanswerable; you'll probably end up with a list of people's interpretation of "framework" with no real way for distinguishing them.

目前的问题可能无法回答。您可能最终会得到一份人们对“框架”的解释列表,而没有真正区分它们的方法。

Perhaps we need a definition of framework? I suggest it is a library that in some way determines the architecture of an entire application. However that is perhaps a definition of "Application Framework", but if you mean the term more broadly, then the question is probably too broad. This definition however makes say Qt a framework, while Boost remains just a library. That makes Boost no more or less useful, so I really don't understand what you are trying to discover from the question.

也许我们需要一个框架的定义?我建议它是一个以某种方式决定整个应用程序架构的库。然而,这可能是“应用程序框架”的定义,但如果您的意思更广泛,那么这个问题可能太宽泛了。然而,这个定义使 Qt 成为一个框架,而 Boost 仍然只是一个库。这使得 Boost 或多或少有用,所以我真的不明白你想从这个问题中发现什么。

Here's a list of UI related libraries that mightbe considered "frameworks":

以下是可能被视为“框架”的 UI 相关库列表:

The most notable distinguishing feature is that some of them are cross-platform, and some are platform specific. Gnome is perhaps distinguished by having a C API (GTK+). .Net supports multiple languages, but requires C++/CLI rather than ISO C++ (but that is no worse than Qt's pre-processor IMO). MFC is a bit long in the tooth and not supported by free or third-party tools. TurboVision is antique and included for my amusement and geek nostalgia.

最显着的区别特征是其中一些是跨平台的,而一些是特定于平台的。Gnome 的特点可能是拥有 C API (GTK+)。.Net 支持多种语言,但需要 C++/CLI 而不是 ISO C++(但这并不比 Qt 的预处理器 IMO 差)。MFC 有点长,不受免费或第三方工具的支持。TurboVision 是古董,包含在我的娱乐和极客怀旧中。

回答by Stefano Altieri

I know this post is old but I found it very useful. I would like to add PoCo(POrtable COmponents) to the list

我知道这篇文章很旧,但我发现它非常有用。我想将PoCo(可移植组件)添加到列表中

I used it for seleral projects and includes a consistent and well designed framework for:

我将它用于 seleral 项目,并包含一个一致且设计良好的框架:

  1. XML
  2. Multi threading
  3. Networking
  4. Cryptography
  5. General purposes
  1. XML
  2. 多线程
  3. 联网
  4. 密码学
  5. 一般用途

It is also portable (I used it on Windows and Unix).

它也是可移植的(我在 Windows 和 Unix 上使用过它)。