how comile C program in linux

Type the command :

gcc -o hello hello.c

invovling phtread in linux, then:

gcc -phtread -o hello hello.c

quoto from stackoverflow’s answer:

In general, libraries should follow sources and objects on command line