开发者

Adding reference to external .dll on Linux

开发者 https://www.devze.com 2023-01-13 07:22 出处:网络
I\'m building an F# application with Mono on a Linux box but need to r开发者_高级运维eference a DLL from the F# Power Pack.

I'm building an F# application with Mono on a Linux box but need to r开发者_高级运维eference a DLL from the F# Power Pack.

How can I do this?


Adding references on Mono works exactly the same way as on Windows. You just need to download PowerPack (there is a ZIP download, which can be extracted on Linux). When building your F# application from the command line, you just specify the reference:

mono <fsharp-path>/fsc.exe 
  --resident 
  -r:<powerpack-path>/FSharp.PowerPack.dll 
  input.fs

This should work just fine (Note the --resident option, which starts F# compiler process in the background and so it makes F# compiler on Mono faster, because it isn't JITted again each time it starts).

0

精彩评论

暂无评论...
验证码 换一张
取 消