为 C++ 设置窗口

发布于 2024-07-21 12:25:54 字数 319 浏览 9 评论 0原文

引用常见问题解答,“毫无疑问,[...] 太“新手””

设置 Windows 系统(vista,如果重要的话)来使用 C++ 的最佳方法是什么?

最好有一个好的IDE,易于编译软件(支持make文件等),但适合初学者。

我非常希望 IDE 使用相对可移植的格式,例如 makefile 和配置脚本,没有什么太专有的。

我还希望能够轻松添加新的库等,并能够使用其他人编写的大多数 C++ 代码。

我很舒服地使用命令行。

感谢您的帮助,希望问题很清楚。 如果已经得到回答,我深表歉意,我确实寻找过类似的问题。

To quote the FAQ, 'No question is [...] too "newbie"'

What is the best way to set up an Windows system (vista, if that matters) to work with C++?

Preferably with a nice IDE, easy compiling of software (support for make files, etc.), but suitable for a beginner.

I would quite like the IDE to use a relatively portable format, such as makefiles and configure scripts, nothing too proprietary.

I would also like the ability to add new libraries etc. without much hassle, and work with the majority of C++ code others have written.

I am comfortable using the command line.

Thanks for the help, hopefully the question is clear. And apologies if it's already been answered, i did have a look for similar questions.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(8

戈亓 2024-07-28 12:25:54

Windows 上有很多不错的 C++ IDE。

专业软件开发的事实标准是 Microsoft 的 Visual Studio,它有不同的版本,例如免费的 Express 版本。 这将为您提供一个用于 Windows 开发的出色工具链。

但是,对于更“跨平台”的方法,您应该查看免费的 Eclipse C++ 开发工具< /a>,适用于许多平台。 只要你自己的代码是平台无关的,整个项目就可以在 Windows、Linux、Mac 等之间共享。

其他替代方案是 MinGWCygWin 都允许使用 Windows 上的 GCC 工具链。

There are quite a few good IDEs for C++ available on Windows.

The de-facto standard for professional software development is Microsoft's Visual Studio, which is available in different versions, like the free Express Editions. This will give you a great tool-chain for Windows development.

However, for a more "cross-platform" approach, you should have a look to the free Eclipse C++ Development Tooling, which is available for many platforms. As long as your own code is platform-independent, the whole project can be shared between Windows, Linux, Mac, etc.

Other alternatives are MinGW or CygWin that both allow to use the GCC toolchain on Windows.

初心 2024-07-28 12:25:54

Microsoft 的 Visual Studio 有一个免费的 Express 版本,其中包含 C++ 编程所需的几乎所有内容。
对于 Gui,主要的选择可能是 MFC(又旧又丑)、CLR/.Net(新且令人困惑)或者看看 Qt(现在是 LGPL)或 wxWigets

Microsoft's Visual Studio has a free express edition which contains pretty much everything you need to program c++.
For a Gui, the main choices are probably, MFC (old and ugly), CLR/.Net (new and confusing) or look at Qt(now LGPL) or wxWigets

◇流星雨 2024-07-28 12:25:54

我知道这并不完全是“没有什么专有的”,但您应该看看免费的 Express 版本Visual C++。 在它的掩护下,您将获得所有熟悉的 make 和命令行工具,但封装在一个精美的 IDE 中。

如果您真的对命令行很熟悉,那么您可以在编译器/调试器套件之上从代码编辑器创建一个 IDE。 MS 自己的命令行工具附带 平台 SDK(免费),您将在 中获得一个很棒的调试器Windbg。 我个人最喜欢的代码编辑器是 Code Insight。 我非常希望有 Mac 版本/叹息。

I know this is not exactly 'nothing to proprietary' but you should give a look at the free Express Edition of Visual C++. Under its covers you'll get all the familiar make and command line tools, but wrapped in a polished IDE.

If you're really comfortable with the command line then you can make an IDE from code editor on top of a compiler/debugger suite. MS's own command line tools come with the platform SDK (free) and you get an awesome debugger in Windbg. My personal favorite code editor is Code Insight. I wish so hard for a Mac version /sigh.

心的憧憬 2024-07-28 12:25:54

尝试使用 MinGW 编译器,它将附带 C 和 C++ 编译器、Make 等,还有许多其他编译器。 这可以很容易地从命令行使用:g++ -o someprogram.exe somecode.cpp

至于 IDE,有很多。 现在我正在使用 Code::Blocks,到目前为止它非常好。 此外,它已经支持 GCC 编译器,并为您设置了许多适当的标志,因此您真正需要做的就是点击“构建”按钮。

您可能想尝试的其他一些工具是 Eclipse,它非常强大,但在您开始习惯之前,它的许多“功能”将非常令人困惑且难以使用。 Visual C++ 是另一种,它(显然)可以很好地集成到 Windows 中。 当然,您始终可以使用 emacs :)

Try the MinGW compiler, it will come with a C and C++ compiler, Make, etc--among many others. This can be used from the command line, pretty easily: g++ -o someprogram.exe somecode.cpp

As for an IDE, there are lots out there. Right now I am using Code::Blocks, and so far it's been really nice. As well, it already supports the GCC compiler, and sets many of the appropriate flags for you, so all you'll really need to do is hit the "build" button.

Some others you might want to try are Eclipse, which is really powerful, but lots of its "power" will be really confusing and difficult to use until you start getting used to it. Visual C++ is another one, which (obviously) would integrate very nicely into Windows. Of course, you could always use emacs :)

美人如玉 2024-07-28 12:25:54

我建议您评估CodeBlocks

I suggest you evaluate CodeBlocks.

再浓的妆也掩不了殇 2024-07-28 12:25:54

Microsoft 的 Visual Studio 功能强大,但相当专有。 如果您喜欢开放/便携式的东西,我推荐 Dev-C++Cygwin

Microsoft's Visual Studio is powerful but rather proprietary. If you prefer open/portable stuff, I recommend Dev-C++ and Cygwin.

内心荒芜 2024-07-28 12:25:54

FWIW,我最近经历了这个并尝试了基于 VC++ Express 和 QT Creator 的东西。 来自 linux/unix 背景的我发现 QT 更好一点,因为它使用 Ming 编译器和一些基于 make 的构造。

FWIW, I recently went through this and tried the VC++ Express and QT Creator based stuff. Coming from a linux/unix background I found that QT was a little better since it was using the Ming compilers and some make based constructs.

诗酒趁年少 2024-07-28 12:25:54

如果您只在 Windows 上进行黑客攻击,我会选择 Visual Studio。 它肯定会节省您花在编码上的时间。 大多数 Windows 开源软件要么已经有 VC 项目,如果没有,设置一个通常非常简单。 通常他们有 make 或 nmake 文件供你构建 VC 兼容的库来链接。

If you will only be hacking for windows I would go for Visual Studio. It will definitely save you time you can spend on coding instead. Most open source out there for windows either already have VC project, and if they don't it is usually very simple to set one up. And normally they have either make or nmake files for you to build VC compatible libararies to link with.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文