Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/ruby-on-rails-4/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ocaml 如何正确地将str模块添加到oasis配置?_Ocaml_Oasis - Fatal编程技术网

Ocaml 如何正确地将str模块添加到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:

我现在有什么:

_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生成的文件-设置:

当我构建时,看到下一个错误:

如果有人对答案感兴趣,在修改您自己的\u oasis文件后,您需要运行oasis安装程序以获取修改

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