In case you're using a command-line version, you can obtain the mono sources by checking out two modules, mono and mcs: You can obtain a command-line Win32 version here, or the graphical TortoiseSVN client. For this you'll need a subversion client, command-line or graphical. These can be obtained through anonymous SVN from. To compile Mono you'll need, of course, the Mono sources. cygdrive is the default name of this folder, so if you've customized this, substitute accordingly. That /cygdrive path is a folder that cygwin makes available for you to access your windows drives by using linux-style paths. LD_LIBRARY_PATH=.:/usr/local/lib:/usr/lib:/lib:/cygdrive/c/Mono-1.2.2.1/libĮxport PATH PKG_CONFIG_PATH LD_LIBRARY_PATH PKG_CONFIG_PATH=.:/lib/pkgconfig:/cygdrive/c/Mono-1.2.2.1/lib/pkgconfig Add the following lines to the end of the file: Go to your newly created c:\cygwin\home\user, and edit the. It will create your home directory when you open it the first time, so as soon as that's done and you get a prompt, close the shell. Now that cygwin is installed, open the cygwin shell.
Download it, and extract make.exe from usr/bin. GLib is supplied as a part of the Mono for Windows bundle, so we'll use that.Ī proper make version, v3.80, is available from the Mono website.
The make version that comes with cygwin does not handle dos-style paths in pc files well, and will cause "multiple target patterns" errors when compiling Mono.
At this point, do not install make or glib. These selections will automatically select other packages, which is good and proper(tm). Here, select the following packages to install
When you get to the package selection, click on the View button on the top right corner, to get to the Full View. For the rest of this tutorial, it is assumed that you have installed cygwin to c:\cygwin. You can download the setup from the Cygwin website. Installing Cygwin consists of running setup.exe, choosing where to install it to, and what packages you want to install. Alternatively, you could check that the packages that you have installed are not on the forbidden list below, in which case you'll need to uninstall them to compile Mono. If you have cygwin already installed, it might be worth it to install it again to a different directory so that you have a clean cygwin to work with. The setup presented here is a lean, mean configuration, with the bare minimum to compile Mono. Installing Cygwin is a pretty easy affair, the hard part being exactly *what* to install in the myriads of options given to us by the cygwin setup. The tutorial assumes that you install it at c:\Mono-1.2.2.1. Just download the latest release and run the installer. It is available on the Project Mono website. So the first thing we need to do is to download and install the latest Mono for Windows. The simplest way to compile Mono is to use an already working Mono and go from there.
This is because it is assumed that the Mono sources are sitting under a cygwin path, which is kind of hard to assume if you don't install cygwin before checking out the Mono sources. This is the order by which this tutorial assumes you are doing things.
This tutorial is designed to overcome brittleness and pain, though it won't do much for lack of coffee. Cygwin is very brittle, dependencies are a pain, and it takes so long you end up running out of coffee before it's finished, which is always a bad sign. Traditionally, compiling Mono on windows has never been easy.
That's ok, been there, done that, got the tshirt and kicked the mailman. Good for you! It also might mean that you're trying to do it while keeping an handle on your sanity, at least long enough to actually *code* something. Welcome, welcome! If you're reading this, it's probably because you want to try your hand at compiling Mono on Windows, possibly with the idea of contributing to Mono. It's not about compiling applications with Mono. This document is about configuring cygwin to compile Mono.
Or How to go there and back again while remaining reasonably sane Mono + Cygwin Installation and Compilation Tutorial The Hideout - Programming - Mono & Cygwin Tutorial