Unix systems:
The University's central irix Service is a Silicon Graphics Inc. Challenge XL system which runs a Unix-like operating sysem called IRIX. The basic information to run a C program on this
system is covered in document HT.SI.05 - How To... Run C Programs On The irix Service. Although this document refers to the IRIX operating system many of the command options will
be common to all Unix systems.
On all Unix systems further help on the C compiler can be obtained from the on-line manual. Type
man cc
on your local Unix system for more information.
Please note that Unix is a case sensitive operating system and files named firstprog.c and FIRSTPROG.c are treated as two separate files on these system. By default the Unix system
compiles and links a program in one step, as follows:
cc firstprog.c
This command creates an executable file called a.out that overwrites any existing file called a.out. Executable files on Unix are run by typing their name. In this case the program is run as
follows:
a.out
To change the name of the executable file type:
cc -o firstprog.c
This produces an executable file called firstprog which is run as follows:
firstprog
The University's central irix Service is a Silicon Graphics Inc. Challenge XL system which runs a Unix-like operating sysem called IRIX. The basic information to run a C program on this
system is covered in document HT.SI.05 - How To... Run C Programs On The irix Service. Although this document refers to the IRIX operating system many of the command options will
be common to all Unix systems.
On all Unix systems further help on the C compiler can be obtained from the on-line manual. Type
man cc
on your local Unix system for more information.
Please note that Unix is a case sensitive operating system and files named firstprog.c and FIRSTPROG.c are treated as two separate files on these system. By default the Unix system
compiles and links a program in one step, as follows:
cc firstprog.c
This command creates an executable file called a.out that overwrites any existing file called a.out. Executable files on Unix are run by typing their name. In this case the program is run as
follows:
a.out
To change the name of the executable file type:
cc -o firstprog.c
This produces an executable file called firstprog which is run as follows:
firstprog
Comments
Post a Comment