802fbead97614e3f5704a8be1eb58ab1a8ee19c6
[mono.git] / man / mcs.1
1 .TH mcs 1 "6 January 2001"
2 .SH NAME 
3 mcs \- Mono Compiler Suite.
4 .SH SYNOPSIS
5 .B mcs 
6 [option] [source-files]
7 .SH DESCRIPTION
8 mcs is the Mono C# compiler, an implementation of the ECMA-334
9 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.
13 .PP
14 C# source files must end with a ".cs" extension.  Compilation of C#
15 source code requires all the files that make up a library, module or
16 executable to be provided on the command line.  There is no support
17 for partial compilation.  To achieve the benefits of partial
18 compilation, you should compile programs into their own assemblies,
19 and later reference them with the "-r" flag.
20 .PP
21 The Mono C# compiler generates images (.exe files) that contain CIL
22 byte code that can be executed by any system that implements a Common
23 Language Infrastructure virtual machine such as the Microsoft .NET
24 runtime engine on Windows or the Mono runtime engine on Unix systems.
25 Executables are not bound to a specific CPU or operating system.
26 .PP
27 .SH OPTIONS
28 .TP
29 .I \-\-about
30 Displays information about the Mono C# compiler
31 .TP
32 .I \-\-checked
33 Sets the default compilation mode to `checked'.  This makes all
34 the math operations checked (the default is unchecked).
35 .TP
36 .I \-\-define SYMBOL
37 Defines a symbol named SYMBOL.  This can be tested in the source code
38 by the pre-processor.
39 .TP
40 .I \-\-fatal 
41 This is used for debugging the compiler.  This makes the error emission
42 generate an exception that can be caught by a debugger.
43 .TP
44 .I \-\-stacktrace
45 Generates a stack trace at the time the error is reported, useful for
46 debugging the compiler.
47 .TP
48 .I \-L PATH
49 Directs the compiler to look for libraries in the specified path.
50 Multiple paths can be provided.
51 .TP
52 .I \-\-nostdlib
53 Use this flag if you want to compile the core library.  This makes the
54 compiler load its internal types from the assembly being compiled.
55 .TP
56 .I \-\-nowarn XXX
57 Makes the compiler ignore warning XXX.
58 .TP
59 .I \-o FNAME
60 Names the output file to be generated.
61 .TP
62 .I \-\-optimize
63 Turns on optimizations in the compiler.  
64 .TP
65 .I \-\-parse
66 Used for benchmarking.  The compiler will only parse its input files.
67 .TP
68 .I \-\-probe X L
69 Probes for the code to generate an error named `X' in line `L'.  This
70 is only used by the test suite.
71 .TP
72 .I \-\-recurse PATTERN
73 Does recursive compilation using the specified pattern.  In Unix the
74 shell will perform globbing, so you migth want to use it like this:
75 .PP
76 .nf
77                 bash$ mcs --recurse '*.cs' 
78 .fi
79 .TP
80 .I \-\-resource FILE
81 Adds FILE as a resource of the resulting assembly.
82 .TP
83 .I \-\-target KIND
84 Used to specify the desired target.  The possible values are: exe,
85 winexe, library and module.  
86 .TP
87 .I \-\-timestamp
88 Another debugging flag.  Used to display the times at various points
89 in the compilation process.
90 .TP
91 .I \-\-unsafe
92 Enables compilation of unsafe code.
93 .TP
94 .I \-\-werror
95 Treat warnings as errors.
96 .TP
97 .I \-\-wlevel LEVEL
98 Sets the warning level.  0 is the lowest warning level, and 4 is the
99 highest.  The default is 2.
100 .TP
101 .I \-r ASSEMBLY
102 Reference the named assembly.  Use this to use classes from the named
103 assembly in your program.
104 .TP
105 .I \-v 
106 Debugging. Turns on verbose yacc parsing.
107 .TP
108 .I \-\-
109 Use this to stop option parsing, and allow option-looking parameters
110 to be passed on the command line.
111 .PP
112 .SH NOTES
113 During compilation the MCS compiler defines the __MonoCS__ symbol,
114 this can be used by pre-processor instructions to compile Mono C#
115 compiler specific code.
116 .SH AUTHORS
117 The Mono C# Compiler was written by Miguel de Icaza and Ravi Pratap at
118 Ximian. 
119 .PP
120 .SH LICENSE
121 The Mono Compiler Suite is released under the terms of the GNU GPL.
122 Please read the accompanying `COPYING' file for details.  Alternative
123 licenses are available from Ximian.
124 .PP
125 .SH BUGS
126 To report bugs in the compiler, you can use `bug-buddy', or you can
127 file bug reports in our bug tracking system:
128 http://bugzilla.ximian.com.
129 .SH MAILING LIST
130 The Mono Mailing List is available at: mono-list-request@ximian.com
131 .SH MORE INFORMATION
132 The Mono C# compiler is developed by Ximian, Inc
133 (http://www.ximian.com) (http://www.ximian.com) and is based on the
134 ECMA C# language standard available here:
135 http://www.ecma.ch/ecma1/STAND/ecma-334.htm
136
137