1 .TH mcs 1 "6 January 2001"
3 mcs \- Mono Compiler Suite.
6 [option] [source-files]
8 mcs is the Mono C# compiler, an implementation of the ECMA-334
9 language specification. You can pass one or more options to drive the
10 compiler, and a set of source files. Extra options or arguments can
11 be provided in a response file. Response files are referenced by
12 prepending the @ symbol to the response file name.
14 The Mono C# compiler accepts the same options than the Microsoft C#
15 compiler does. Those options can start with a slash or a dash
16 (/checked is the same as -checked). Additionally to this, the
17 GNU-like options are supported, those begin with "--". All
18 MCS-specific flags which are not available in the Microsoft C#
19 compiler are available only with the GNU-style options.
21 C# source files must end with a ".cs" extension. Compilation of C#
22 source code requires all the files that make up a library, module or
23 executable to be provided on the command line. There is no support
24 for partial compilation. To achieve the benefits of partial
25 compilation, you should compile programs into their own assemblies,
26 and later reference them with the "-r" flag.
28 The Mono C# compiler generates images (.exe files) that contain CIL
29 byte code that can be executed by any system that implements a Common
30 Language Infrastructure virtual machine such as the Microsoft .NET
31 runtime engine on Windows or the Mono runtime engine on Unix systems.
32 Executables are not bound to a specific CPU or operating system.
37 Displays information about the Mono C# compiler
39 .I -checked, -checked+
40 Sets the default compilation mode to `checked'. This makes all
41 the math operations checked (the default is unchecked).
44 Sets the default compilation mode to `unchecked'. This makes all
45 the math operations unchecked (this is the default).
47 .I \-define:SYMLIST, -d:SYMLIST
48 Defines the symbol listed by the semi-colon separeted list SYMLIST
49 SYMBOL. This can be tested in the source code by the pre-processor,
50 or can be used by methods that have been tagged with the Conditional
53 .I \-debug, \-debug+, \-g
54 Generate debugging information.
57 Do not generate debugging information.
60 This is used for debugging the compiler. This makes the error emission
61 generate an exception that can be caught by a debugger.
64 Generates a stack trace at the time the error is reported, useful for
65 debugging the compiler.
68 Each path specified in the comma-separated list will direct the
69 compiler to look for libraries in that specified path.
72 Directs the compiler to look for libraries in the specified path.
73 Multiple paths can be provided by using the option multiple times.
75 .I \-nostdlib, -nostdlib+
76 Use this flag if you want to compile the core library. This makes the
77 compiler load its internal types from the assembly being compiled.
79 .I \-noconfig, \-noconfig+
80 Disables the default compiler configuration to be loaded. The
81 compiler by default has references to the system assemblies.
84 Makes the compiler ignore warnings specified in the comma-separeted
87 .I -out:FNAME, -o FNAME
88 Names the output file to be generated.
91 Used for benchmarking. The compiler will only parse its input files.
94 Probes for the code to generate an error named `X' in line `L'. This
95 is only used by the test suite.
98 Embeds to the given resource file.
100 .I /linkresource:RESOURCE
101 Links to the given resource file.
103 .I \-recurse:PATTERN, --recurse PATTERN
104 Does recursive compilation using the specified pattern. In Unix the
105 shell will perform globbing, so you migth want to use it like this:
108 bash$ mcs -recurse:'*.cs'
111 .I \-target:KIND, \-t:KIND
112 Used to specify the desired target. The possible values are: exe,
113 winexe, library and module.
116 Another debugging flag. Used to display the times at various points
117 in the compilation process.
119 .I \-unsafe, -unsafe+
120 Enables compilation of unsafe code.
122 .I \-warnaserror, \-warnaserror+
123 Treat warnings as errors.
126 Sets the warning level. 0 is the lowest warning level, and 4 is the
127 highest. The default is 2.
129 .I -r:ASSEMBLY, \-r ASSEMBLY
130 Reference the named assembly. Use this to use classes from the named
131 assembly in your program. The assembly will be loaded from either the
132 system directory where all the assemblies live, or from the path
133 explicitly given with the -L option.
136 Debugging. Turns on verbose yacc parsing.
139 Use this to stop option parsing, and allow option-looking parameters
140 to be passed on the command line.
147 defines have a special meaning to the compiler.
149 By default calls to methods and properties in the
150 System.Diagnostics.Trace class are not generated unless the TRACE
151 symbol is defined (either through a "#define TRACE") in your source
152 code, or by using the
156 By default calls to methods and properties in the
157 System.Diagnostics.Debug class are not generated unless the DEBUG
158 symbol is defined (either through a "#define DEBUG") in your source
159 code, or by using the
163 Note that the effect of defining TRACE and DEBUG is a global setting,
164 even if they are only defined in a single file.
166 .SH DEBUGGING SUPPORT
167 When use the "--debug" or "-g" flag, MCS will create an assembler file
168 FILE-debug.s containing debugging information where FILE is the name of
169 the generated assembly. You need to run this file through the assembler
170 to get a object file FILE-debug.o. See mono's "--dwarf-plus" argument
171 for details on how to use this file.
173 During compilation the MCS compiler defines the __MonoCS__ symbol,
174 this can be used by pre-processor instructions to compile Mono C#
175 compiler specific code.
177 The Mono C# Compiler was written by Miguel de Icaza, Ravi Pratap and
178 Martin Baulig at Ximian.
181 The Mono Compiler Suite is released under the terms of the GNU GPL.
182 Please read the accompanying `COPYING' file for details. Alternative
183 licenses are available from Ximian.
189 To report bugs in the compiler, you can use `bug-buddy', or you can
190 file bug reports in our bug tracking system:
191 http://bugzilla.ximian.com.
193 The Mono Mailing List is available at: mono-list-request@ximian.com
195 The Mono C# compiler is developed by Ximian, Inc
196 (http://www.ximian.com) (http://www.ximian.com) and is based on the
197 ECMA C# language standard available here:
198 http://www.ecma.ch/ecma1/STAND/ecma-334.htm