Temporary hack, as we still use MS libs for now
[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 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.
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 \-\-debug or \-g
41 Generate debugging information.  
42 .TP
43 .I \-\-fatal 
44 This is used for debugging the compiler.  This makes the error emission
45 generate an exception that can be caught by a debugger.
46 .TP
47 .I \-\-stacktrace
48 Generates a stack trace at the time the error is reported, useful for
49 debugging the compiler.
50 .TP
51 .I \-L PATH
52 Directs the compiler to look for libraries in the specified path.
53 Multiple paths can be provided.
54 .TP
55 .I \-\-nostdlib
56 Use this flag if you want to compile the core library.  This makes the
57 compiler load its internal types from the assembly being compiled.
58 .TP
59 .I \-\-noconfig
60 Disables the default compiler configuration to be loaded.  The
61 compiler by default has references to the system assemblies. 
62 .TP
63 .I \-\-nowarn XXX
64 Makes the compiler ignore warning XXX.
65 .TP
66 .I \-o FNAME
67 Names the output file to be generated.
68 .TP
69 .I \-\-optimize
70 Turns on optimizations in the compiler.  
71 .TP
72 .I \-\-parse
73 Used for benchmarking.  The compiler will only parse its input files.
74 .TP
75 .I \-\-probe X L
76 Probes for the code to generate an error named `X' in line `L'.  This
77 is only used by the test suite.
78 .TP
79 .I \-\-recurse PATTERN
80 Does recursive compilation using the specified pattern.  In Unix the
81 shell will perform globbing, so you migth want to use it like this:
82 .PP
83 .nf
84                 bash$ mcs --recurse '*.cs' 
85 .fi
86 .TP
87 .I \-\-resource FILE
88 Adds FILE as a resource of the resulting assembly.
89 .TP
90 .I \-\-target KIND
91 Used to specify the desired target.  The possible values are: exe,
92 winexe, library and module.  
93 .TP
94 .I \-\-timestamp
95 Another debugging flag.  Used to display the times at various points
96 in the compilation process.
97 .TP
98 .I \-\-unsafe
99 Enables compilation of unsafe code.
100 .TP
101 .I \-\-werror
102 Treat warnings as errors.
103 .TP
104 .I \-\-wlevel LEVEL
105 Sets the warning level.  0 is the lowest warning level, and 4 is the
106 highest.  The default is 2.
107 .TP
108 .I \-r ASSEMBLY
109 Reference the named assembly.  Use this to use classes from the named
110 assembly in your program.  The assembly will be loaded from either the
111 system directory where all the assemblies live, or from the path
112 explicitly given with the -L option.
113 .TP
114 .I \-v 
115 Debugging. Turns on verbose yacc parsing.
116 .TP
117 .I \-\-
118 Use this to stop option parsing, and allow option-looking parameters
119 to be passed on the command line.
120 .PP
121 .SH DEBUGGING SUPPORT
122 When use the "--debug" or "-g" flag, MCS will create an assembler file
123 FILE-debug.s containing debugging information where FILE is the name of
124 the generated assembly. You need to run this file through the assembler
125 to get a object file FILE-debug.o.  See mono's "--dwarf-plus" argument
126 for details on how to use this file.
127 .SH NOTES
128 During compilation the MCS compiler defines the __MonoCS__ symbol,
129 this can be used by pre-processor instructions to compile Mono C#
130 compiler specific code.
131 .SH AUTHORS
132 The Mono C# Compiler was written by Miguel de Icaza and Ravi Pratap at
133 Ximian. 
134 .PP
135 .SH LICENSE
136 The Mono Compiler Suite is released under the terms of the GNU GPL.
137 Please read the accompanying `COPYING' file for details.  Alternative
138 licenses are available from Ximian.
139 .PP
140 .SH SEE ALSO
141 mono(1), mint(1)
142 .PP
143 .SH BUGS
144 To report bugs in the compiler, you can use `bug-buddy', or you can
145 file bug reports in our bug tracking system:
146 http://bugzilla.ximian.com.
147 .SH MAILING LIST
148 The Mono Mailing List is available at: mono-list-request@ximian.com
149 .SH MORE INFORMATION
150 The Mono C# compiler is developed by Ximian, Inc
151 (http://www.ximian.com) (http://www.ximian.com) and is based on the
152 ECMA C# language standard available here:
153 http://www.ecma.ch/ecma1/STAND/ecma-334.htm
154
155