我在 Linux 上使用 gtk2hs 编写了一个小应用程序,效果很好。后来我尝试在 Windows(xp,7)上运行相同的应用程序,但没有成功。我安装了:
- haskell 取胜平台
- gtk2hs 全部在一个包中,路径中没有空格,并将 %PATH% 设置为其 /bin 文件夹
- 阴谋集团安装 gtk2hs-buildtools
- 阴谋集团安装gtk
- ghc --make -O2 Main.hs
一切都可以编译和链接。当尝试运行该应用程序时,它说:
c:\wordtrend>Main
(Main.exe:3228): GLib-GObject-CRITICAL **: gtype.c:2708: You forgot to call g_ty
pe_init()
(Main.exe:3228): GLib-GObject-CRITICAL **: gtype.c:2708: You forgot to call g_ty
pe_init()
(Main.exe:3228): GLib-GObject-CRITICAL **: g_type_interface_add_prerequisite: as
sertion `G_TYPE_IS_INTERFACE (interface_type)' failed
(Main.exe:3228): GLib-GObject-CRITICAL **: g_type_add_interface_static: assertio
n `G_TYPE_IS_INSTANTIATABLE (instance_type)' failed
(Main.exe:3228): GLib-GObject-CRITICAL **: gtype.c:2708: You forgot to call g_ty
pe_init()
(Main.exe:3228): GLib-GObject-CRITICAL **: g_type_add_interface_static: assertio
n `G_TYPE_IS_INSTANTIATABLE (instance_type)' failed
(Main.exe:3228): GLib-GObject-CRITICAL **: gtype.c:2708: You forgot to call g_ty
pe_init()
(Main.exe:3228): GLib-GObject-CRITICAL **: g_type_add_interface_static: assertio
n `G_TYPE_IS_INSTANTIATABLE (instance_type)' failed
(Main.exe:3228): GLib-GObject-CRITICAL **: g_object_new: assertion `G_TYPE_IS_OB
JECT (object_type)' failed
Segmentation fault/access violation in generated code
我不知道从哪里开始。