How to get F# working with Mono?
Solution 1
- Go here and download fsharp.zip
- Unzip it and open the created folder
- Open the terminal and run ./install-mono.sh as root (On some systems, it is necessary to convert the newline characters in that script from CRLF to LF)
This will give you the basic functionality which means you will be able to run "mono fsi.exe" and compiled F# apps as "mono myApp.exe".
Usefull tips:
-
It makes sense to create scripts for the compiler and F# interactive. i.e.:
/usr/local/bin/fsc
#!/bin/sh exec /usr/bin/mono /usr/local/src/FSharp-1.9.9.9/bin/fsc.exe $@
/usr/local/bin/fsi
#!/bin/sh exec /usr/bin/mono /usr/local/src/FSharp-1.9.9.9/bin/fsi.exe $@
F# interactive (fsi.exe) is trying to reference System.Windows.Forms by default so in order to run it WinForms support in Mono will be required
fsi.exe works better in Xterm than in Gnome Terminal.
Solution 2
For reference, there are now Linux (.deb and .rpm) packages and a Mac OS X installer available at http://fsxplat.codeplex.com/ which will save you the work of having to manually copy around files and make your own launcher scripts.
Solution 3
Yes, there's one. Check this out: F# for Mono
Solution 4
You can download the F# zip file from Microsoft and then run (for example) "mono fsi.exe".
Solution 5
What Piotr Zurek said is basically what i did to get F# and mono to work on Ubuntu 9.04, with the following comments:
- Rember to install WinForm support with Mono. Otherwise you can't start fsi.exe.
- ./install-mono.sh should be run with root privileges (sudo ./install-mono.sh).
- Gnome Terminal dosn't play well with fsi.exe. Start a normal xterm and run fsi.exe whithin that.
Related videos on Youtube
vishwas kumar
Bad programming is easy. Idiots can learn it in 21 days, even if they are dummies. --Teach Yourself Programming In Ten Years
Updated on November 01, 2020Comments
-
vishwas kumar over 3 years
I can't seem to find a compiler/plugin for mono. Does one exist?
-
Nels Beckman almost 14 yearsAny particular version of Mono needed? I have 2.0, which I assume is pretty old, and F# complains that some DLLs are missing, in particular System.Windows.Forms...
-
epotter over 13 yearsIt looks like this link is dead.
-
Matti over 13 yearsUpdated the link to point to the latest download. Thanks for the heads-up, @epotter.
-
Totti over 13 years@Nels: I've tried with pretty much every FSI and Mono ever released and can rarely get them to work. Right now, F# 2.0 and Mono 2.8 just appear to hang after I enter anything.
-
Muhammad Alkarouri over 13 years@Jon: same for me. Any progress?
-
Totti over 13 years@Muhammad: Apparently this was a bug in F# and I think it was fixed in their November release blogs.msdn.com/b/dsyme/archive/2010/11/10/…
-
Muhammad Alkarouri over 13 years@Jon: I will have another go at it then. Thanks a lot.
-
Totti over 13 years@Muhammad: No, I just tried the latest Nov 2010 release of F# and it is still broken in exactly the same way. I have no idea why.
-
AxA over 11 yearscould not succeed installing the addin on mono develop 2.8