gcc,
cc, and other compilers are available. The general
form for compiling a program written in C would be:
% gcc -o filename.out
filename.c
where filename.c
is the source file, and filename.out is the name
you want to give the binary. cc, gcc and
g++ have many command line options. For more
detailed information on these, we suggest initially
looking at the Man pages:
% man gcc
% man cc
As one final note, there
are man pages for some standard library functions,
such as malloc(). The example with malloc
() is especially pertinent, as it and other functions
that relate to it are stored in the stdlib.h
header file (which is something you can find out from
the man pages, but otherwise might throw you
for a loop).
|