Raspberry Pi Mono libgdiplus

I had several issues trying to build the libgdiplus library for Raspberry Pi in order to use Mono with Windows Forms. I thought I would make this page to detail what I had to do to get it to build.

First I followed the instructions on a blog post from Neil Danson and a forum post by djkingsley. djkingsley has some scripts that I copied and will use for the build from later on. Here are the links to the blog post and the forum post for your reference:

Blog Post: http://neildanson.wordpress.com/2013/12/10/building-mono-on-a-raspberry-pi-hard-float/

Forum Post: http://www.raspberrypi.org/phpBB3/viewtopic.php?f=34&t=62496&p=468434#p468434

What I mainly want to talk about here is the setup of the environment before you try to build Mono and libgdiplus. I assume you are starting with a fresh SD card and have installed NOOBS and then booted to NOOBS and chosen the Raspbian image.

Once you have Raspbian up and running you can follow these steps to get everything installed that you need in order to build Mono and libgdiplus that will then allow you to build Windows Forms Mono apps:

sudo apt-get install automake

sudo apt-get install libtool

sudo apt-get install libglib2.0-dev

sudo apt-get install libxrender-dev

sudo apt-get install libfontconfig1-dev

sudo apt-get install libpng12-dev

sudo apt-get install libgif-dev

sudo apt-get install libjpeg8-dev

sudo apt-get install libtiff5-dev

sudo apt-get install libexif-dev

sudo apt-get install gettext

Once you install all of those packages you can create / copy the scripts from the forum post above and run them. The one thing I changed in the scripts was to put sudo in front of the important things so that I would not get errors trying to delete folders and such when needed.

I then run the script and wala, you have the Mono system + Windows Forms libraries.