[Mono-list] Newbie - How do I compile example?

LKeene lionel.keene at gmail.com
Mon Mar 2 14:41:42 EST 2009

Hello all, Mono newbie here. How do I compile the following example (which
I've entered via Microsoft Norepad and saved as "c:\Mono Test\Simple.cs":

using System.Windows.Forms;
using System.Drawing;

public class Simple : Form
    public Simple()
       Text = "Simple";
       Size = new Size(250, 200);

    static public void Main()
       Application.Run(new Simple());

I've installed Mono 2.2 using the default installation parameters on my
Wndows XP box. Then, at the command prompt, I tried changing to the compiler
directory (the directory containing gmcs.exe) via:

"cd c:\Program files\Mono-2.2\lib\mono\2.0"

Then I invoke the compiler and specify the file to compile using the

"gmcs -r:System.Windows.Forms.dll -r:System.Drawing.dll c:\Mono

I get errors at compile time claimg "'Mono' could not be found" &
"Test\Simple.cs" could not be found. What is the proper procedure for doing
this? Thanks so much in advance!


View this message in context: http://www.nabble.com/Newbie---How-do-I-compile-example--tp22295161p22295161.html
Sent from the Mono - General mailing list archive at Nabble.com.

More information about the Mono-list mailing list