Quantcast
Channel: Active questions tagged ocaml - Stack Overflow
Viewing all articles
Browse latest Browse all 527

OCaml : Library ounit2 not found

$
0
0

I want to run unit test with OCaml and OUnit2I have followed the instructions in this tutorial https://cs3110.github.io/textbook/chapters/data/ounit.html

However, when I run

dune build

I get the error

$ dune buildFile "test/dune", line 3, characters 12-18:3 |  (libraries ounit2))                ^^^^^^Error: Library "ounit2" not found.-> required by _build/default/test/test.exe-> required by alias test/all-> required by alias default

My directory structure looks like this:

│   dune-project│   mon_project.opam│├───bin│       dune│       main.ml│       sum.ml│├───lib│       dune│├───test│       dune│       mon_project.ml│       test.ml

The dune file in the directory test looks like this:

(executable (name test) (libraries ounit2))

sum.ml and test.ml are exactly like in the tutorial.

What do I do wrong?


Viewing all articles
Browse latest Browse all 527

Trending Articles