zwvista

导航

Haskell语言学习笔记(67)Gtk2Hs

Gtk2Hs

$ brew cask install xquartz
$ brew install glib cairo gtk gettext fontconfig freetype
$ export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:
$ cabal install alex happy
$ cabal install gtk2hs-buildtools
Installed gtk2hs-buildtools-0.13.3.1
$ cabal install glib
$ cabal install gtk -f have-quartz-gtk
Installed gtk-0.14.7

window

import Graphics.UI.Gtk

main :: IO ()
main = do
  initGUI
  window <- windowNew
  widgetShowAll window
  mainGUI

posted on 2017-12-30 10:39  zwvista  阅读(209)  评论(0编辑  收藏  举报