小编Nik*_* W.的帖子

有没有办法在 OCaml 沙丘中用连字符声明可执行文件?

我正在使用沙丘建立一个演示项目,并想将可执行文件命名为“hello-world.exe”而不是“hello_world”。如果我尝试构建项目,我会收到编译器错误。如何在文件名中使用连字符声明可执行文件?

我正在使用沙丘 1.9.3 和 OCaml 4.05.0。

沙丘:

(executable
 (name hello-world))
Run Code Online (Sandbox Code Playgroud)

你好-world.ml

(executable
 (name hello-world))
Run Code Online (Sandbox Code Playgroud)

构建错误

let () = print_endline "Hello, World!"
Run Code Online (Sandbox Code Playgroud)

ocaml ocaml-dune

5
推荐指数
1
解决办法
198
查看次数

标签 统计

ocaml ×1

ocaml-dune ×1