I’ve just duplicated my dune project, the duplicated copy is called “Idaho”.
Here’s how I did the duplication :
dune init proj Idaho
Which was successful, as the output was
Entering directory 'Idaho'
Success: initialized project component named Idaho
Leaving directory 'Idaho'
-
Adjusting the dune files : as my project has two dune files, lib/dune and
watched/dune, I first copied them from the old project to the new, then replaced
the old project name with the new in the copies. -
Copying the ocaml files in
lib
orwatched
from the old project to the new
Now, when I try dune build
after all this, I get the following error :
$ dune build
File “bin/dune”, line 4, characters 12-17:
4 | (libraries Idaho))
^^^^^
Error: Library “Idaho” not found.
→ required by _build/default/bin/main.exe
→ required by alias bin/all
→ required by alias default
Note that I prefer to call my main library idaho_lib
rather than idaho
; here is
the lib/dune
file :
(include_subdirs unqualified)
(library
(flags -w +1..31+33..69+71+72)
(name idaho_lib)
(libraries str unix zarith))
I insist that for the what regards dune, my two projects are identical except for the project names.
And calling dune build
causes no error in the old project. What am I missing here ?