Quantcast
Channel: OCaml - Topics tagged dune
Viewing all articles
Browse latest Browse all 521

Dune: depending on local module "Library not found"

$
0
0

Under my project root I have two folders, one for library code and one for the final binary built from main.ml. Unfortunately I’m missing something since dune can’t seem to find the library code

File "bin/dune", line 3, characters 12-15:
3 |  (libraries lib))
                ^^^
Error: Library "lib" not found.
Hint: try: dune external-lib-deps --missing @@default

Here’s the folder structure:

.
|-- bin
|   |-- dune
|   |-- dune-project
|   `-- main.ml
|-- dune-project
`-- lib
    |-- dune
    `-- math.ml

Here’s bin/dune:

(executable
 (name main)
 (libraries lib))

And lib/dune

(library
 (name lib))

From the dune documentation on library dependencies it seems like dune should automatically find libraries defined within the current scope / workspace. What am I doing wrong?

2 posts - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 521

Trending Articles