Open ghilesZ opened 3 years ago
Yes indeed, these bindings are installed in ~/.opam/$VERSION/lib/sdl2
.
The command ocamlfind query sdl2
should confirm that (if the installation inside opam proceeded correctly.)
Should I document this point in the README file or in the INSTALL file? Or maybe I should merge INSTALL inside a paragraph of README?
Personally, I usually assume that everything is in the README. Just so you know, the fact that the opam package and location inside ~/.opam/$VERSION/lib/sdl2
do not have the same name messes with dune's external-lib-deps feature:
When ocamlsdl2 is not installed, having (libraries sdl2)
in the dune file and doing dune external-lib-deps --missing @@default
results in dune outputing:
The following libraries are missing in the default context:
- sdl2
Hint: try:
opam install sdl2
and then:
opam install sdl2
[ERROR] No package named sdl2 found.
Which is a bit confusing.
Symetrically, when ocamlsdl2 is installed, putting (libraries ocamlsdl2)
in the dune file produces:
The following libraries are missing in the default context:
- ocamlsdl2
Hint: try:
opam install ocamlsdl2
and then
opam install ocamlsdl2
[NOTE] Package ocamlsdl2 is already installed (current version is 0.04).
I tried to compile a small example using dune and weirdly, adding
(libraries ocamlsdl2)
to my stanza produces the error:Eventhough it is installed, as shown from the command:
However, putting
(libraries sdl2)
in my dune file works fine. Is this a normal documented behaviour? Is this a bug of dune? Or a bug of OCamlSDL2?