Ocaml 如何正确地将str模块添加到oasis配置?
我现在有什么: _oasis文件:Ocaml 如何正确地将str模块添加到oasis配置?,ocaml,oasis,Ocaml,Oasis,我现在有什么: _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:
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生成的文件-设置:
当我构建时,看到下一个错误:
如果有人对答案感兴趣,在修改您自己的\u oasis文件后,您需要运行oasis安装程序以获取修改 愚蠢的我,感谢IRC ocaml聊天中的Drup