Basic C/C++ Compilation in a Unix Environment

From my own experience, I think this is the best way to learn basic Linux / C / C++ programming. These steps are basic guidelines.  You should use Google and other tutorials to assist you with the specific steps, which I believe is part of the learning process.

1.)    Install Ubuntu Linux on a virtual machine (rest of these steps should be performed in the linux virtual machine)

Free Virtual Machine: https://www.virtualbox.org/

Ubuntu Linux : http://www.ubuntu.com/download/ubuntu/download
I recommend Ubuntu 10.04 32-Bit (because its the current long-term support)

2.)    Learn how to install a basic program in Ubuntu using:

sudo apt-get install <program-name>

3.)    Install vim or emacs text editor programs (I use emacs)

sudo apt-get install emacs

4.)    Create a hello world (main.c) file using vim or emacs

5.)    Compile and run the hello world program from the command line (Terminal)

6.)    Create a makefile to simplify the build procedure

7.)    Install and use “cmake” to automatically generate the makefile and build the hello world program

 

Linux Tutorial:

http://www.ee.surrey.ac.uk/Teaching/Unix/

C Hello World Help:

http://www.learn-programming.za.net/programming_c_learn01.html

Makefile help:

http://www.opussoftware.com/tutorial/TutMakefile.htm

Cmake Help:

http://www.cmake.org/cmake/help/cmake_tutorial.html