[Mono-list] Newbie - How to invoke compiler after installing?
lionel keene
lionel.keene at gmail.com
Mon Mar 2 15:25:22 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);
CenterToScreen();
}
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 following:
"gmcs -r:System.Windows.Forms.dll -r:System.Drawing.dll c:\Mono Test\simple.cs"
I get errors at compile time claimg "'Mono' could not be found" &
"Test\Simple.cs" could not be found.
After hunting aroud online I changed appended the following to my PATH
system variable:
";C:\Program Files\Mono-2.2\bin"
Then I changed directories to the one containing my csharp source:
"cd C:\Mono Test"
I then try to compile via:
"gmcs -r:System.Windows.Forms.dll -r:System.Drawing.dll c:\Mono Test\simple.cs"
I get an error claiming "gmcs is not recognized as an internal or
external command"
What is the proper procedure for doing this? Thanks so much in advance!
-L
More information about the Mono-list
mailing list