【发布时间】:2013-09-26 18:57:46
【问题描述】:
如何在没有控制台的情况下在 Windows 下创建或编译 GUI 应用程序? 我已经在互联网上搜索过,但没有找到任何有用的东西。如果您能提供任何指导,我将不胜感激。
(* ocamlc -I +labltk labltk.cma gui.ml -o gui.exe *)
open Tk ;;
let top = openTk () ;;
Wm.title_set top "Application 1" ;;
Wm.geometry_set top "200x500";;
let blue = Button.create ~text:"Blue" top ;;
let red = Button.create ~text:"Red" top ;;
pack [blue ; red];;
let mylist = Listbox.create ~selectmode:`Multiple top
let _ = Listbox.insert
~index:`End
~texts:["Mozart";"Chopin";"Beethoven";"Verdi";"Bizet"]
mylist ;;
pack [mylist];;
let _ = Printexc.print mainLoop ();;
【问题讨论】:
标签: windows user-interface ocaml