Following the discussion, I attempted to create a new project
opam exec -- dune init proj ncforeign
and copied and renamed the files from the example from: https://github.com/yallop/ocaml-ctypes/tree/master/examples/ncurses/foreign
ncurses_cmd.ml was renamed to ./bin/main.ml
ncurses.ml was renamed to ./lib/ncurses.ml
ncurses.mli was renamed to ./lib/ncurses.mli
I need a self contained example that replicates the example from ocamnl-ctypes
I guess I need to edit the dune files.
I can run the ncurses example in the following way
cd ./ncforeign/ dune build dune exec ncforeign