繁体   English   中英

如何正确地将str模块添加到oasis配置中?

[英]How properly add str module to oasis config?

我现在有什么:

_oasis文件:

OASISFormat: 0.4
Name:        Count Lines
Version:     0.0.1
Synopsis:    Counts the number of lines in the project
Authors:     Bogdan Nechyporenko
License:     LGPL-2.1 with OCaml linking exception
Executable "count-lines"
  Path:       src
  BuildTools: ocamlbuild
  BuildDepends: str
  MainIs:     main.ml

src / main.ml:

open Str ;;

let endswith s1 s2 =
  let re = Str.regexp (Str.quote s2 ^ "$")
  in
  try ignore (Str.search_forward re s1 0); true
  with Not_found -> false

我正在运行命令来构建它:

ocaml setup.ml -build

其余的只是由ocaml -setup生成的文件: 在此处输入图片说明

当我构建时,看到下一个错误: 在此处输入图片说明

如果有人对答案感兴趣,则在修改您自己的_oasis文件后,您需要运行“ oasis setup”来进行修改。

愚蠢的我,感谢IRC中的Drup #ocaml聊天!!!

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM