À few questions regarding the interactive toplevel and graphical UI programming:
Is it possible to build a graphical interface dynamically from ocaml toplevel?
It is possible to use the Graphics library too?
install lwt-glib and lablgtk, on debian based systems:
apt-get install liblwt-glib-ocaml-dev liblablgtk2-ocaml-dev
in the OCaml toplevel, load everything:
#use "topfind";;
#require "lwt.simple-top";;
#require "lwt.glib";;
#require "lablgtk2";;
then initialise the GTK and the LWT integration:
GMain.init ();;
Lwt_glib.install ();;
And play:
let w = GWindow.window ();;
w#show ();;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With