如何让 F# 与 Mono 一起工作? [英] How to get F# working with Mono?
问题描述
我似乎找不到单声道的编译器/插件.有吗?
I can't seem to find a compiler/plugin for mono. Does one exist?
推荐答案
- 转到这里并下载 fsharp.zip
- 解压并打开创建的文件夹
- 打开终端并以 root 身份运行 ./install-mono.sh(在某些系统上,需要将该脚本中的换行符从 CRLF 转换为 LF)
- 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)
这将为您提供基本功能,这意味着您将能够运行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".
有用的提示:
为编译器和 F# 交互创建脚本是有意义的.即:
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屋!