The last line of this code
#load "graphics.cma";;
open Graphics;;
open_graph " 600x400";;
returns the following error:
Graphics.Graphic_failure "Cannot open display My-Machine.local"
Since I use Emacs 24.4 in tuareg mode, on OSX 10.9.5, I've installed XQuartz 2.7.7 and tried to tune it (looked here).
I checked whether Graphics is properly installed (and, since all the primitives but "open_graph" work, I think it is) and looked for an answer here and there, but it doesn't really match my problem.
Any idea?
I may mention that, though I'm OK with OCaml, I'm quite new to Emacs (used to work with MacCaml) and totally ignorant about X11.