如何让 F# 与 Mono 一起工作?
我似乎找不到单声道的编译器/插件。 有吗?
I can't seem to find a compiler/plugin for mono. Does one exist?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
我似乎找不到单声道的编译器/插件。 有吗?
I can't seem to find a compiler/plugin for mono. Does one exist?
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(9)
这将为您提供基本功能,这意味着您将能够运行“mono fsi.exe”并将 F# 应用程序编译为“mono myApp.exe”。
有用的提示:
为编译器和 F# 交互创建脚本是有意义的。 即:
/usr/local/bin/fsc
#!/bin/sh
执行 /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) 默认情况下尝试引用 System.Windows.Forms,因此为了运行它,需要 Mono 中的 WinForms 支持
fsi .exe 在 Xterm 中比在 Gnome 终端中工作得更好。
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.
作为参考,现在有 Linux(.deb 和 .rpm)软件包和 Mac OS X 安装程序,位于 http://fsxplat .codeplex.com/ 这将为您节省手动复制文件并制作自己的启动器脚本的工作。
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.
是的,有一个。 看看这个:F# for Mono
Yes, there's one. Check this out: F# for Mono
您可以下载 来自 Microsoft 的 F# zip 文件,然后运行(例如)“mono fsi.exe”。
You can download the F# zip file from Microsoft and then run (for example) "mono fsi.exe".
Piotr Zurek 所说的基本上就是我为让 F# 和 mono 在 Ubuntu 9.04 上工作而所做的,并附有以下评论:
What Piotr Zurek said is basically what i did to get F# and mono to work on Ubuntu 9.04, with the following comments:
到了 2019 年,许多早期的答案都已经过时了。 不需要 zip 文件或类似文件。
从 Ubuntu 19.04 开始,即
disco
您现在可以安装软件包:这为您提供了位于
/usr/bin/fsharpc
的 F-sharp 编译器或者,如果您想要最新的,您可以添加 Mono 存储库并从那里提取软件包,详细信息如下:
https://www.mono-project.com/download/stable/#download-lin
In 2019, a lot of these earlier answers are outdated. No need for zip files or the like.
From Ubuntu 19.04 onwards, i.e.
disco
you can now install packages with:That gives you the F-sharp compiler at
/usr/bin/fsharpc
Alternatively, if you want the latest, you can add the Mono repository and pull packages from there, as detailed at:
https://www.mono-project.com/download/stable/#download-lin
另请在此处查看详细的安装说明,包括 F# PowerPack 和 MySQL 连接器: http://2sharp4u.wordpress.com/2010/09/03/installing-f-2-0-on-monolinux
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
F# 编译器作者之一 Joe Pamer 在 7 月份帮助我恢复了此功能,我在这里写下了这些步骤:http://saladwithsteve.com/2010/07/building-fsharp-on-the-mac.html
Joe Pamer, one of the F# compiler authors, helped me get this working back in July, I wrote up the steps here: http://saladwithsteve.com/2010/07/building-fsharp-on-the-mac.html
如果您使用的是 Ubuntu,请按照以下三个步骤操作。
运行以下命令。
启动 MonoDevelop。 转到加载项管理器,图库> 语言绑定> F#,安装。
If you are on Ubuntu, follow the following three steps.
Run the following commands.
Start MonoDevelop. go to add-in manager, Gallery > Language bindings > F#, install.