$ man -k owner
$ apropos owner
$ gcc --version $ type cc cc is /usr/bin/cc $ ls -li /usr/bin/cc $ type gcc gcc is hashed (/usr/bin/gcc) $ ls -li /usr/bin/gccSince both /usr/bin/cc and /usr/bin/gcc link to the same i-node 7951 (some number) in the example, you know that these two files are linked to the same executable file.
$ gcc -c main.c $ gcc -E main.c -o main.ppExamine main.pp.
$ gcc -x cpp-output -c main.pp -o main.o $ g++ -c reciprocal.cpp $ g++ -c -D NDEBUG reciprocal.cpp $ g++ -c -D NDEBUG=3 reciprocal.cpp $ g++ -c reciprocal.cppCheck the size of reciprocal.o.
$ g++ -c -O2 reciprocal.cppCompare the new size with the previous.
$ g++ -o reciprocal main.o reciprocal.o $ ./reciprocal 7 The reciprocal of 7 is 0.142857Link with a library say libncurses.
$ g++ -o reciprocal main.o reciprocal.o -lncursesIf it is not in your path, locate it by locate command; type
$locate libncursesThen say it is the path; /usr/local/lib/ncurses. Give the location of this library by
% g++ -o reciprocal main.o reciprocal.o -L/usr/local/lib/ncurses -lncursesCheck the sizes and compare with the cases you compiled without library flags.
% g++ -o reciprocal reciprocal.o main.o -lncurses -staticCheck the sizes and compare with the cases you compiled without static.
%gcc pedant.c -o pedantthis code compiles without complaint.
%gcc -ansi pedant.c -o pedantAgain, no complaint.
%gcc -pedantic pedant.c -o pedant pedant.c: In function `main?: pedant.c:9: warning: ANSI C does not support `long long?The code compiles, despite the emitted warning. (These messages may be different.)
%gcc -pedantic-errors pedant.c -o pedant pedant.c: In function `main?: pedant.c:9: ANSI C does not support `long long?With -pedantic- errors, however, it does not compile. GCC stops after emitting the error diagnostic.
$man gccand read once to see how many possible flags we have.