Skip to content

ctypes-foreign name issue #3214

@arnau

Description

@arnau

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?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions