Using the local C# installation
Ximian's Mono C# compiler and runtime
have been installed locally for use by CS538 students.
Here are instructions for using the installation from a Solaris workstation
(the Novas) or a Linux workstation (the Tuxes) only.
- The installation resides in this directory:
/u/p/l/plakal/courses/cs538/spring03/cs/mono
- Add the `bin' subdirectory of the installation to your PATH environment
variable. The `bin' subdirectory contains the compiler and runtime executables.
Adding them to your PATH will make them accessible without having to type
in the full path each time you want to run them. Here's how to do it depending
on the Unix shell you use (tcsh is the default shell in case you don't know
which shell you're using):
For tcsh or csh, you can add this line to your ~/.cshrc file to set the PATH
every time you start a new shell:
setenv PATH /u/p/l/plakal/courses/cs538/spring03/cs/mono/bin:$PATH
For bash, you can add this line to your ~/.bashrc file to set
the PATH every time you start a new shell:
PATH=/u/p/l/plakal/courses/cs538/spring03/cs/mono/bin:$PATH
export PATH
- The name of the C# compiler is `mcs' (Mono C# Compiler). So if you
have a C# program in a file called `foo.cs', then executing this:
mcs foo.cs
will produce a C# executable called `foo.exe' in the same directory as `foo.cs'.
For information on options you can give the compiler, run:
mcs -help
- C# executables cannot be executed directly, they need to be interpreted
by a C# interpreter. The name of the interpreter is `mint' (Mono interpreter).
So if you have a C# executable in a file called `foo.exe', then executing
this:
mint foo.exe
will execute foo.exe. For information on options you can give the interpreter,
run:
mint -help
- Some sample C# programs have been placed in this directory:
/u/p/l/plakal/courses/cs538/spring03/cs/mono/samples
These are small test cases and benchmarks taken from the Mono
source distribution. For more sample programs, see the various C# introduction
and tutorial links on the CS538 C# page.
If you have problems with the C# installation, please send mail to Manoj Plakal <plakal@cs.wisc.edu>
(your CS538 TA)