So what have I been up to lately? Well, lots of different things. I have been taking it easy on the open source and blogging side of things as its been a hectic time of late in my personal life. This seems to be changing now so I’m starting to get all of the ideas spinning around in my head into physical reality, or virtual reality, or what ever you want to call it. Anyway, here’s the first post on the subject of programming in F# using MonoDevelop and Mono natively on Macs.
I have always been a fan of Mono but I have always shied away from using it in anger, this is mainly due to my Windows heritage and using Visual Studio almost exclusively at work. Times are changing though, and over the past few years I have been using Macs more and more. In fact the only place where I still use Windows natively is at work, so it makes sense to get a development environment up and running to support me.
Once the Beta of Mono 3.0 goes live it should contain within it a nice shiny new F# 3.0 installation, but until then we have to do a number of manual steps:
- Install Mono 3.0
- Install MonoDevelop
- Compile and install F#3.0
- Compile and install the MonoDevelop F# Language Binding
Install Mono 3.0
IF you think you already have these installed you can check which version you have by Navigating to the directory:
You should see version 3.0 in the list:
Also ensure that the
Current symbolic link points to Mono version 3.0, when I was first tried to get things running I couldn’t understand why I kept getting a version mismatches, this was because my link was pointing to Mono 2.10.9.
These instruction can also be found here but I thought it might be helpful to keep everything at hand here, if nothing else it will serve as a reference if I need to do this again or help anybody out.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
Once that’s all finished you can check everything is working by running
1 2 3 4 5
If you didn’t get a version 3.0 Compiler build displayed then check where
fsharpc is running from by using the
You can now navigate there and check where the symbolic link is pointing to be using the
-l parameter of the
1 2 3
When I first tried to get the F# 3.0 compiler installed I had all sorts of problem with the symbolic link pointing to the old version. I don’t know whether the installer had failed or whether an old version of the F# compiler or the F# language binding had caused issues, the process was so much smoother on my MacBook Pro as it was a clean install.
Build the MonoDevelop F# language binding
1 2 3 4 5
That’s it we’re all done! Pretty easy stuff thanks to Ben Winkel and others for putting in some time to fix up the issues.
Now you should be able to fire up MonoDevelop and start building some F# code!
You can check the add-in is installed properly my opening the Add-in Manager from the MonoDevelop menu. The F# language binding should be shown as:
When you start a new solution you should now be presented with some F# specific options:
Until next time…