Alex Rivera | Logout

C and C++ programming on Ubuntu 11.10

Asked 2011-10-29T07:38:36.843
17

I've recently installed Ubuntu 11.10 and along with it the CodeBlocks IDE and I am aware that I have gcc and the std libraries by default.

My questions are:

  • Do you you have any tips for a new C++ programmer on Ubuntu?
  • Any libraries I should get from the start?
  • A really good IDE I'm missing? (YMMV but I prefer to work in IDE's)
  • Any programming boons or traps I should be aware of from the start?
Edit
Report

3 Answers

7

Since you ask more than one question I will answer each separately.

Do you you have any tips for a new C++ programmer on Ubuntu?

  • Learn some build system such as CMake or SCons. Although understanding how make and Makefiles work is useful there is a tendency of moving away from make to more high-level tools which also provide configure-like functionality. Make is often used for command-line build, for example with CMake you can generate Makefiles and build your projects using make.

  • Use a version control system such as git or Mercurial. I also recommend keeping those your projects you care about on some external service like github at least for the purposes of backup.

  • Pay attention to compiler warnings but keep in mind that warnings only catch a fraction of possible errors. A more complete picture can be obtained using static analysis tools and dynamic analysis tools like Valgrind.

Any libraries I should get from the start?

2
answered 2011-10-29T08:04:29.693
1

Library: I recommend you to use Boost. You can find many libraries in it. IDE: Eclipse and QTCreator are good IDEs, but I think it is also very important to use text editor + makefile. Vim, Emacs or Sublime Text is good choice. Always remember to backup your code.

answered 2012-04-04T08:29:48.310

Your Answer