Compiler

In this tutorial I use the GCC compiler and a simple editor like emacs, because both are open source and so on free available.

You have to pass on all luxury of a development program if you like to learn programming, because when you typing in this programs tell you which commands are possible and that is like copy paste in my opinion. But development software like Visual C++, Eclipse and Xcode to example are very useful in the software development of complex software.

Usage of GCC compiler

GCC is an open source compiler collektion of the Gnu Project and includes Fortran, Objective-C, Java, C and C++.

In the command line or terminal was compiled with the following:

g++ helloworld.cpp

The compiler starts the preprocessor and the preprocessor prepare macros, logical and arithmetic expressions to readable code for the compiler. The linker includes all libraries and files of your project into one bytecode and then translate it into machine code and build a file called:

helloworld.o

The ending .o means out and it is executable in Unix based systems like Linux, Gnome or Mac OS X if you key in:

./helloworld.o

If you like an other name for your executable then key in

g++ helloworld.cpp -o helloworld

or

g++ -o helloworld helloworld.cpp

In Unix based systems is the file ending for executable files not so important as in Windows based systems, because the ending must be ends with .exe. Width chmod u+x helloworld to example you make all files executable in Unix and you don't need ./ to execute your file.