How to get F# working with Mono?

后端 未结 9 1054

I can\'t seem to find a compiler/plugin for mono. Does one exist?

相关标签:
9条回答
  • 2021-01-30 07:09
    1. Go here and download fsharp.zip
    2. Unzip it and open the created folder
    3. 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:

    1. 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 $@

    2. 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

    3. fsi.exe works better in Xterm than in Gnome Terminal.

    0 讨论(0)
  • 2021-01-30 07:14

    What Piotr Zurek said is basically what i did to get F# and mono to work on Ubuntu 9.04, with the following comments:

    1. Rember to install WinForm support with Mono. Otherwise you can't start fsi.exe.
    2. ./install-mono.sh should be run with root privileges (sudo ./install-mono.sh).
    3. Gnome Terminal dosn't play well with fsi.exe. Start a normal xterm and run fsi.exe whithin that.
    0 讨论(0)
  • 2021-01-30 07:15

    Look also here for detailled installation instructions including F# PowerPack and MySQL connector: http://2sharp4u.wordpress.com/2010/09/03/installing-f-2-0-on-monolinux

    0 讨论(0)
  • 2021-01-30 07:20

    Yes, there's one. Check this out: F# for Mono

    0 讨论(0)
  • 2021-01-30 07:21

    If you are on Ubuntu, follow the following three steps.

    1. Download and install ".deb" package from here.
    2. Run the following commands.

      sudo apt-add-repository ppa:directhex/ppa 
      sudo apt-get update 
      sudo apt-get install monodevelop
      
    3. Start MonoDevelop. go to add-in manager, Gallery > Language bindings > F#, install.

    0 讨论(0)
  • 2021-01-30 07:22

    You can download the F# zip file from Microsoft and then run (for example) "mono fsi.exe".

    0 讨论(0)
提交回复
热议问题