The Foreign Function Interface chapter uses the ctypes-foreign library, installed using opam install ctypes-foreign. So far so good.
When using the library though, the examples use #require "ctypes-foreign" for utop and ctypes-foreign.threaded for dune:
(executable
(name ncurses)
(libraries ctypes-foreign.threaded))
Which leads to the following error:
$ dune build ncurses.exe
File "dune", line 3, characters 13-36:
3 | (libraries ctypes-foreign.threaded))
^^^^^^^^^^^^^^^^^^^^^^^
Error: Library "ctypes-foreign.threaded" not found.
Hint: try: dune external-lib-deps --missing ncurses.exe
If instead I use ctypes.foreign.threaded it works fine.
I tried to fix the book but then the tests fail. I suspect it's because the ctypes version in the duniverse folder is out of date?
The Foreign Function Interface chapter uses the
ctypes-foreignlibrary, installed usingopam install ctypes-foreign. So far so good.When using the library though, the examples use
#require "ctypes-foreign"for utop andctypes-foreign.threadedfor dune:Which leads to the following error:
If instead I use
ctypes.foreign.threadedit works fine.I tried to fix the book but then the tests fail. I suspect it's because the
ctypesversion in theduniversefolder is out of date?