我已经安装了Xamarin来学习F#并编写一个简单的程序:
[] let main args = printfn "%d" 10 0
如果我从Xamarin Studio启动它,一切正常.但是,如果我尝试编译并从控制台运行它我得到错误:
$ fsharpc some.fs F# Compiler for F# 3.1 (Open Source Edition) Freely distributed under the Apache 2.0 Open Source License # demas at MacBook-Air-demas.local in ~/temporary [17:47:22] $ ./some.exe zsh: exec format error: ./some.exe
我该如何解决?
尝试:
mono some.exe
或者使用完整路径:
/usr/bin/mono ./some.exe
http://www.mono-project.com/archived/guiderunning_mono_applications/