Please contact or Mt Xia for assistance with all your shell programming needs.
5. COMPILING PROGRAMS IN UNIX
This chapter will examine compiling source code programs in three high level languages "C", FORTRAN, and COBOL. The second part of the chapter will look at the archive and library maintainer. The archive allows you to create a library of object modules. These files are used by the link editor.5.1 "C": Sample Program with a Main and Two Functions in One
File Based on the command line options, cc compiles, assembles, and load C language source code programs. It can also assemble and load assembly language source programs or merely load object programs.
| 
  Command Format:  cc [options] file-list                      
                                                               
  (See Appendix E for a complete list of options)              
 | 
|  
  Command Format:  cc -o output source                         
                                                               
  output - the name of the executable file                     
                                                               
  source - the name of the C source code file                  
 | 
| 
  Command Format:  cc -S hello.c                               
                                                               
  -S = Compile only                                            
 | 
|  
     Command Format:     cc -c main.c funct1.c funct2.c        
                                                               
     -c = Compile, but do not load object files.  This option  
          causes cc to compile and/or assemble source code     
          programs and leave the corresponding object programs 
          in files with filename extensions of .o.             
 | 
| Command Format: f77 |