[Mono-devel-list] Building mono and mcs on Windows - DETAILED INSTRUCTIONS

Giovanni Zito gzito at mbox.thunder.it
Tue Jan 6 07:53:06 EST 2004

Building mono and mcs for Windows
by Giovanni Zito (gzito at mbox.thunder.it)


I decided to write this guide because I found that existing instructions weren't detailed enough.

I spent almost one week before I can successfull build mono on Windows.


So here are detailed steps to help you get a working version of mono 0.29 on Windows.


I've tested it on Windows XP SP1, but it should work on Windows 2000 as well.



Prepare your building environment

1) Install the .NET SDK V1.1 from msdn.microsoft.com/downloads. I've put this step here simply because previous instructions states to install it. I'm don't know if and why this step is required. By the way, if you have Microsoft Visual Studio .NET 2003 installed on your system (as me), probably you can skip this step.

2) Install the latest cygwin setup (about 30MB). Start choosing the default installation if you are not sure what packages you need. You'll can always get the other missing packages later, if mono configure script will require them. Be sure to get libiconv (not just libiconv2 !).


3) Get mono and mcs archives from 


http://www.go-mono.com/archive/mcs-0.29.tar.gz and http://www.go-mono.com/archive/mono-0.29.tar.gz.


then extract the tarballs in a directory of your choice. I chose to create directory "src" in my home.


$ mkdir ~/src

$ cd ~/src

$ tar xvfz <path-where-you-downloaded-mono>/mono-0.29.tar.gz

$ tar xvfz <path-where-you-downloaded-mono>/mcs-0.29.tar.gz



Get mono dependencies

4) Get the precompiled GLIB 2.0 and pkg-config packages (and their dependencies) by the GIMP for Windows project:




and extract the tarballs into /usr/local.


The /usr/local/bin directory should be in your PATH (by cygwin settings). Also ensure that /usr/local/lib is in your PATH, otherwise add the line




to your "~/.bashrc". After this remember to restart your cygwin envirorment (or "source ~/.bashrc").



5) Get the Boehm garbage collector library (libgc) from http://www.hpl.hp.com/personal/Hans_Boehm/gc/gc_source/gc6.2.tar.gz.


I spent many hours here. You must not build gclib with cygwin, you have to do it with cl.exe (i.e. the Microsoft compiler)!


Extract the source tarball and then compile it using "nmake" from Visual Studio .NET 2003 Command Prompt.


More information about the Mono-devel-list mailing list