Home Segments Index Top Previous Next

661: Mainline

To produce an object file from a source-code file, you issue a command to the compiler with the -c option. In the following, for example, the compiler and linker, which happens to be named cc, produces a main.o file:

cc -c main.c 

If you want, you can produce several object files at once. In the following, for example, you produce two object files as though you had issued two commands to the C compiler.

cc -c main.c trades.c