该参数用来指定生成的可执行文件的名字,输入gcc hello.c -o hello
 这时生成的可执行文件就不是a.out了而是hello,输入./hello即可运行该程序。 
$ls hello.c $gcc hello.c -o hello $ls hello.c hello $./hello hello world!
该参数用来生成可以用gdb调试的可执行文件。
$ls hello.c $gcc hello.c -g -o hello $ls hello.c hello $gdb ./hello ...
(gdb)
键入下面代码:
    #include <stdio.h>
    #include <math.h>
    int main(int argc, char *argv[])
    {
            float f = 9.0;
            printf("%.2f", sqrt(f));
    }在编译上面的代码时会出现如下情况:
$gcc math.c -o math /tmp/ccN9fsbV.o: In function `main test.c:(.text+0x2d): undefined reference to `sqrt'这是gcc在编译的时候没有默认连接数学库(libm),像这样输入:
collect2: ld returned 1 exit status
$gcc math.c -o math -lm $./math 3.00在l的后边加上m,告诉编译器要连接数学库。