How properly add str module to oasis config?

89 views Asked by At

What do I have right now:

_oasis file:

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

I'm running command to build it:

ocaml setup.ml -build

The rest is just generated files by ocaml -setup: enter image description here

And when I'm building see the next error: enter image description here

1

There are 1 answers

0
Bogdan Nechyporenko On BEST ANSWER

If somebody interested in the answer, after modifying your own _oasis file you need to run "oasis setup" to pick up the modification.

Stupid me, thanks to Drup in IRC #ocaml chat!!!