0
我在caml中有一个小函数的问题。 这里我的功能:Ocaml:异常Graphics.Graphic_failure(“Xlib错误:BadPixmap(无效的Pixmap参数)”)
let show img =
let h = height img in
let w = width img in
open_graph (" "^string_of_int w^"x"^string_of_int h);
set_window_title "Seam Carving";
draw img;
if Graphics.key_pressed() then
match Graphics.read_key() with
| 'q' -> close_graph()
| _ ->()
;;
当我点击按钮“Q”,我有这样的错误: Fatal error: exception Graphics.Graphic_failure("Xlib error: BadPixmap (invalid Pixmap parameter)")
或段故障。
有人能解释一下这种错误的原因吗?谢谢:)
您的代码不起作用。 – didierc
'q'按钮是什么? – didierc
你应该尝试提供一个最小化的可编译程序来暴露你想要得到解释的问题。 – didierc