next up previous contents
Next: Running Programs Up: Compiling and Running C Previous: Compiling and Running C

Compiling

To compile the source code in a file called prog.c and to obtain the executable in file called prog you would enter the following IRIX command, cc prog.c -o prog -lm. We normally use the library -lm to access the math library.

If you plan to use the debugger (dbx, described in the next section) use the following command for compilation cc -g prog.c -o prog -lm.



Sushil Prasad
Fri Oct 9 10:28:36 EDT 1998