Friday, July 11, 2008

1.4 The C++ Programming Environment in Linux

The best way to learn a programming language is to try writing programs and test them on a computer! To do this, we need several pieces of software:
An editor with which to write and modify the C++ program components or source code,
A compiler with which to convert the source code into machine instructions which can be executed by the computer directly,
A linking program with which to link the compiled program components with each other and with a selection of routines from existing libraries of computer code, in order to form the complete machine-executable object program,
A debugger to help diagnose problems, either in compiling programs in the first place, or if the object program runs but gives unintended results.
There are several editors available for Linux (and Unix systems in general). Two of the most popular editors are
emacs and vi. For the compiler and linker, we will be using the GNU g++ compiler/linker, and for the debugger we will be using the GNU debugger gdb. For those that prefer an integrated development environment (IDE) that combines an editor, a compiler, a linking program and a debugger in a single programming environment (in a similar way to Microsoft Developer Studio under Windows NT), there are also IDEs available for Linux (e.g. V IDE, kdevelop etc.)

0 comments: