如何让F#与Mono一起工作? [英] How to get F# working with Mono?

查看:150
本文介绍了如何让F#与Mono一起工作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我似乎无法找到单声道的编译器/插件。是否存在?

解决方案


  1. 前往 here 并下载fsharp.zip 解压缩并打开创建的文件夹
  2. li>
  3. 打开终端并以根用户运行./install-mono.sh(在某些系统上,需要将该脚本中的换行符从CRLF转换为LF)

这将为您提供基本功能,这意味着您可以将mono fsi.exe和编译的F#应用程序运行为mono myApp.exe。

有用提示:


  1. 编译器和F#交互。即:

    / 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


    $ b $ <#>#!/ bin / sh
    exec / usr / bin / mono /usr/local/src/FSharp-1.9.9.9/bin/fsi.exe $ @


  2. F#交互式(fsi.exe)默认尝试引用System.Windows.Forms,所以为了运行它,Mono中的WinForms支持将


  3. fsi.exe在Xterm中比在Gnome Terminal中更好。



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

解决方案

  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.

这篇关于如何让F#与Mono一起工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆