Hello, GCC on Ubuntu
1) Install gcc on ubuntu:
sudo apt-get install gcc g++
sudo apt-get install build-essential
2) Write a Hello.c with VIM like this:
#include <stdio.h>
int main() { printf(“Hello, gcc\n”); }
3) Compile & Link Hello.c like this:
gcc Hello.c -o Hello
4) After that you will see a file named “Hello” will be created under current working directory, input “./Hello”<Enter>. Then you will see:
Hello, gcc
The full source code could be download from here.