2

I have a minimal program using the Graphics module that just does open Graphics;; open_graph "";;, and I'm building it with ocamlbuild -package graphics test.native. The compilation succeeds, but when I execute the .native file, nothing happens and the program just hangs until I interrupt it.

I'm running OS X 10.10. I've installed xquartz and ocaml (using --with-x11) using Homebrew and restarted several times. I've tried running this minimal graphics program as well with the same results. I've tried starting the xquartz application before executing, also with the same results. I'm sure that the graphics package installed correctly -- running 'ls ocamlc -where/graphics*`' shows the expected graphics.* files.

I'd really appreciate any help with this!

lightlike
  • 937
  • 1
  • 8
  • 12
  • Where did you see that you had to install OCaml with `--with-X11`? All the persons I know who had to install OCaml on Mac never did this. Did you try to install it with opam? (https://opam.ocaml.org/doc/Install.html#OSX) – Lhooq Apr 25 '17 at 11:42
  • in this answer: http://stackoverflow.com/questions/18435927/ocaml-unbound-graphics-module. Originally I'd installed ocaml with brew (`brew install ocaml`) - let me try reinstalling it with OPAM. – lightlike Apr 25 '17 at 13:53
  • Have you installed the libx11-dev package? – ghilesZ Apr 25 '17 at 20:02

0 Answers0