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

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

问题描述

我似乎找不到单声道的编译器/插件.有吗?

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

推荐答案

  1. 转到这里并下载 fsharp.zip
  2. 解压并打开创建的文件夹
  3. 打开终端并以 root 身份运行 ./install-mono.sh(在某些系统上,需要将该脚本中的换行符从 CRLF 转换为 LF)
  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)

这将为您提供基本功能,这意味着您将能够运行mono fsi.exe"并将 F# 应用程序编译为mono myApp.exe".

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

有用的提示:

  1. 为编译器和 F# 交互创建脚本是有意义的.即:

  1. It makes sense to create scripts for the compiler and F# interactive. i.e.:

/usr/local/bin/fsc

/usr/local/bin/fsc

#!/bin/sh执行/usr/bin/mono/usr/local/src/FSharp-1.9.9.9/bin/fsc.exe $@

#!/bin/sh exec /usr/bin/mono /usr/local/src/FSharp-1.9.9.9/bin/fsc.exe $@

/usr/local/bin/fsi

/usr/local/bin/fsi

#!/bin/sh执行/usr/bin/mono/usr/local/src/FSharp-1.9.9.9/bin/fsi.exe $@

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

F# 交互式 (fsi.exe) 默认尝试引用 System.Windows.Forms,因此为了运行它,需要 Mono 中的 WinForms 支持

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 在 Xterm 中比在 Gnome 终端中运行得更好.

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

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

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