简体   繁体   English

Linux 中的 C++ 编程资源

[英]Programming resources for C++ in Linux

I am new (in a way) to C++ programming.我是 C++ 编程的新手(在某种程度上)。 I would like to start doing development in Linux using C and/or C++ as programming languages.我想开始使用 C 和/或 C++ 作为编程语言在 Linux 中进行开发。 I have done some development for a while in Java.我已经用 Java 做了一段时间的开发。

Unfortunately I am not sure where to start.不幸的是,我不确定从哪里开始。 Can you point me to some good resources, and also give me an outline as to what would be the primary difference between C and C++ in Windows and Linux?您能否指出一些好的资源,并简要说明 Windows 和 Linux 中 C 和 C++ 之间的主要区别是什么?

Any special steps I need to do to get started?我需要做什么特殊步骤才能开始? Also any good IDEs.还有任何好的IDE。 I plan to use Eclipse currently.我目前打算使用 Eclipse。 I am using Kubuntu (version 9.x).我正在使用 Kubuntu(版本 9.x)。

It is good that you are using a Linux platform as it will help you to program as per the C and C++ standards.使用 Linux 平台很好,因为它将帮助您按照 C 和 C++ 标准进行编程。

I would recommend我会推荐

vi / vim --> text editor vi / vim --> 文本编辑器

gcc --> C compiler gcc --> C 编译器

g++ --> C++ compiler g++ --> C++ 编译器

gdb --> Command line debugger gdb --> 命令行调试器

ddd --> GUI debugger ddd --> GUI调试器

I use the above mentioned tools.我使用上面提到的工具。 If you are hell-bent on IDEs, you can use the ones mentioned by Chen Levy如果您对 IDE 情有独钟,可以使用 Chen Levy 提到的那些

If you have done development in Java, then you can start with any tutorial on the internet.如果您使用 Java 进行过开发,那么您可以从 Internet 上的任何教程开始。 There are literally hundreds of them!字面上有数百个!

I don't expect it to be hard since you have a Java background.我不认为这会很难,因为您有 Java 背景。

Here is a nice tutorial on CPlusPlus.com .这是 CPlusPlus.com 上的一个不错的教程

Also, check out this question on StackOverflow: The definitive C book guide and list .另外,请查看 StackOverflow 上的这个问题:权威C 书指南和列表

IDE Eclipse is very good as a starting point. IDE Eclipse 非常适合作为起点。 The new CDT provides a completely set up environment.新的 CDT 提供了一个完整的设置环境。 Just be sure to install gcc and gdb before trying out anything.在尝试任何东西之前,请务必安装 gcc 和 gdb。 And don't use the eclipse in the ubuntu repos, download a current release.并且不要在 ubuntu 存储库中使用 eclipse,请下载当前版本。

Difference Windows/Linux: The language standard is completely the same in both worlds.区别 Windows/Linux:两个世界的语言标准完全相同。 (Compiler implementations vary in fullfillment of the standard, but you shouldn't notice anything in the beginning.) If you stick to cross-platform tools, compiler(gcc/mingw), ide and debugger it can stay this way. (编译器实现在标准的完全满足上有所不同,但你不应该在开始时注意到任何东西。)如果你坚持使用跨平台工具,编译器(gcc/mingw)、ide 和调试器,它可以保持这种方式。 (I imply that the obvious differences, like .so s and .dlls and stuff are known) If you move over to other compilers and library implementations (MSVisualC++ for instance) it can get interesting in the advanced stages, but it shouldn't be too difficult to bridge the gaps. (我的意思是明显的区别,比如 .so s 和 .dlls 之类的东西是已知的)如果你转向其他编译器和库实现(例如 MSVisualC++),它会在高级阶段变得有趣,但它不应该弥合差距太难了。

Good/essential libs to know: the stl, boost, and maybe for productivity and ease in the beginning: qt.要知道的好/基本库: stl、boost,也许是为了提高生产力和开始时的轻松:qt。 These are as platform independent and generally useful as possible.这些都是独立于平台的,并且尽可能有用。 Know them, and they are usable through your complete c++ lifetime.了解它们,它们就可以在您的整个 C++ 生命周期中使用。 (Don't make the mistake to want to learn it all in one go, just go step by step. Don't try template programming in the beginning, it is mind-boggling ;) but using templates is fun) (不要犯想一口气学完的错误,一步一步来。不要一开始就尝试模板编程,这令人难以置信;)但是使用模板很有趣)

IDE / Editor I think with Eclipse you can quite good start with. IDE / 编辑器我认为使用 Eclipse 可以很好地开始。 I perfer emacs and use of the command line tools of gcc.我更喜欢 emacs 和 gcc 命令行工具的使用。 Why?为什么? I think you learn more of the basics how they work.我认为您了解更多有关它们如何工作的基础知识。

Good libs : STL, QT, boost with these tree you have the ability to create/develop most of the parts you like or you need.好的库:STL、QT、使用这些树提升你有能力创建/开发你喜欢或需要的大部分部分。

In my opinion very important is that you stuck (in the beginning) to the libray you selected.在我看来,非常重要的是你坚持(一开始)你选择的库。 And also to the IDE/editor.还有 IDE/编辑器。

Starting point : As earlier mentioned Thinking in C++, Second edition (Volume 1 &2) by Bruce Eckel.起点:如前所述,Bruce Eckel 的Thinking in C++,第二版(第 1 卷和第 2 卷) He trys to explain the difference between C and C++.他试图解释 C 和 C++ 之间的区别。 In volume 1 he explains the basics of C++ and in volume 2 he introduces some parts of the STL.在第 1 卷中,他解释了 C++ 的基础知识,在第 2 卷中,他介绍了 STL 的某些部分。

Another usefull ressource for me was C++ FAQ lite Here you can find a lot of usefull tipps.另一个对我有用的资源是C++ FAQ lite在这里你可以找到很多有用的提示。

如果你想要一些图书馆的好地方开始是 sourceforge.net 和 freshmeat.net

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM