.TH mcs 1 "6 January 2001"
.SH NAME
-mcs \- Mono Compiler Suite.
+mcs, gmcs \- Mono Compiler Suite.
.SH SYNOPSIS
.B mcs
[option] [source-files]
be provided in a response file. Response files are referenced by
prepending the @ symbol to the response file name.
.PP
+The
+.I mcs
+compiler is used to compile against the 1.x profile and implements
+C# 1.0 and 2.0 with the exception of generics and nullable types. The
+.I gmcs
+compiler is used to compile against the 2.x profile and implements
+the complete C# 2.0 specification.
+.PP
The Mono C# compiler accepts the same options than the Microsoft C#
compiler does. Those options can start with a slash or a dash
(/checked is the same as -checked). Additionally to this, the
runtime engine on Windows or the Mono runtime engine on Unix systems.
Executables are not bound to a specific CPU or operating system.
.PP
+The Mono C# compiler by default only references three assemblies:
+mscorlib.dll, System.dll and System.Xml.dll. If you want to
+reference extra libraries you must manually specify them using the
+-pkg: command line option or the -r: command line option.
+Alternatively if you want to get all of the System libraries, you can
+use the -pkg:dotnet command line option.
+.PP
.SH OPTIONS
.TP
.I \-\-about
Specifies the code page used to process the input files from the
point it is specified on. By default files will be processed in the
Latin-1 code page. The compiler will also automatically detect
-Unicode files that have an embedded byte mark at the beginning. The
-special ID "utf8" can be used to switch to utf8 and the ID "reset"
-restores the automatic handling of code pages.
+Unicode files that have an embedded byte mark at the beginning.
+.TP
+Other popular encodings are 28591 (Latin1), 1252 (iso-8859-1) and 65001 (UTF-8).
+.TP
+MCS supports a couple of shorthands: "utf8" can be used to specify utf-8 instead
+of using the cryptic 65001 and "reset" restores the automatic handling of
+code pages. These shorthands are not available on the Microsoft compiler.
.TP
.I \-define:SYMLIST, -d:SYMLIST
Defines the symbol listed by the semi-colon separeted list SYMLIST
AssemblyDelaySign (false)] in your source code. Compiler option takes
precedence over the attributes.
.TP
+.I \-doc:FILE
+Extracts the C#/XML documentation from the source code and stores in in
+the given FILE.
+.TP
.I \-\-expect-error X L
The compiler will expect the code to generate an error
named `X' in line `L'. This is only used by the test suite.
ISO-1 - Restrict compiler to use only ISO standardized features.
The usage of features such as generics, static classes, anonymous
methods will lead to error.
+.Sp
+Notice that this flag only controls the language features available to
+the programmer, it does not control the kind of assemblies produced.
+Programs compiled with mcs will reference the 1.1 APIs, Programs
+compiled with gmcs reference the 2.0 APIs.
.TP
.I -lib:PATHLIST
Each path specified in the comma-separated list will direct the
Makes the compiler ignore warnings specified in the comma-separeted
list WARNLIST>
.TP
+.I -optimize, -optimize+, -optimize-
+Controls whether to perform optimizations on the code. -optimize and
+-optimize+ will turn on optimizations, -optimize- will turn it off.
+The default in mcs is to optimize+.
+.TP
.I -out:FNAME, -o FNAME
Names the output file to be generated.
.TP
$ mcs -pkg:gtk-sharp demo.cs
.fi
.TP
+.TP
+.I \-pkg:dotnet
+This will instruct the compiler to reference the System.* libraries
+available on a typical dotnet framework installation, notice that this
+does not include all of the Mono libraies, only the System.* ones. This
+is a convenient shortcut for those porting code.
+.TP
.I -resource:RESOURCE[,ID]
Embeds to the given resource file. The optional ID can be used to
give a different name to the resource. If not specified, the resource