Ticket #1145 (closed defect: fixed)

Opened 6 years ago

Last modified 6 years ago

NativeWindowId does not compile: "cannot convert to a pointer type"

Reported by: guest Owned by: somebody
Priority: normal Milestone:
Component: general (Gtk+, Glib) Version: 0.9.13
Keywords: Cc: matti.niemenmaa+gtk2hsbugs@…

Description

This happened with both GHC 6.8.3 and 6.10.0.20081007 on Windows, using MSYS to build. GTK+ is version 2.14.1.

I worked around this by just wrapping all things that use NativeWindowId in #if 0, which didn't seem to affect things adversely, I just lack all of:

  • Graphics.UI.Gtk.Embedding.Plug
  • Graphics.UI.Gtk.Embedding.Socket
  • Graphics.UI.Gtk.Gdk.drawWindowForeignNew

Relevant make output follows:

/d/Progging/ghc/bin/hsc2hs -C -optc-mms-bitfields +RTS -M120m -RTS -L-optl-Ld:/Progging/GTK/lib -L-optl-lgobject-2.0 -L-optl-lglib-2.0 -L-optl-lintl -L-optl-lgtk-win32-2.0 -L-optl-lgdk-win32-2.0 -L-optl-latk-1.0 -L-optl-lgio-2.0 -L-optl-lgdk_pixbuf-2.0 -L-optl-lpangowin32-1.0 -L-optl-lgdi32 -L-optl-lpangocairo-1.0 -L-optl-lpango-1.0 -L-optl-lcairo -L-optl-lgmodule-2.0 -L-optl-lgthread-2.0 -C-optc-g -C-optc-O2 -C-optc-mms-bitfields -C-optc-mms-bitfields -C-opta-g -C-opta-O2 -C-opta-mms-bitfields -C-opta-mms-bitfields -Id:/Progging/GTK/include/glib-2.0 -Id:/Progging/GTK/lib/glib-2.0/include -Id:/Progging/GTK/include/pango-1.0 -Id:/Progging/GTK/include/glib-2.0 -Id:/Progging/GTK/lib/glib-2.0/include -Id:/Progging/GTK/include/gtk-2.0 -Id:/Progging/GTK/lib/gtk-2.0/include -Id:/Progging/GTK/include/cairo -Id:/Progging/GTK/include/atk-1.0 -C'-optc-include' -C'-optcgtk2hs-config.h' --include gtk/gtk.h --cc="/d/Progging/ghc/bin/ghc" --lflag=-no-hs-main gtk/Graphics/UI/Gtk/General/Structs.hsc
In file included from d:/Progging/GTK/include/glib-2.0/glib/gthread.h:36,
                 from d:/Progging/GTK/include/glib-2.0/glib/gasyncqueue.h:34,
                 from d:/Progging/GTK/include/glib-2.0/glib.h:34,
                 from d:/Progging/GTK/include/glib-2.0/gobject/gtype.h:26,
                 from d:/Progging/GTK/include/glib-2.0/gobject/gboxed.h:26,
                 from d:/Progging/GTK/include/glib-2.0/glib-object.h:25,
                 from d:/Progging/GTK/include/glib-2.0/gio/gioenums.h:30,
                 from d:/Progging/GTK/include/glib-2.0/gio/giotypes.h:30,
                 from d:/Progging/GTK/include/glib-2.0/gio/gio.h:28,
                 from d:/Progging/GTK/include/gtk-2.0/gdk/gdkapplaunchcontext.h:30,
                 from d:/Progging/GTK/include/gtk-2.0/gdk/gdk.h:32,
                 from d:/Progging/GTK/include/gtk-2.0/gtk/gtk.h:32,

                 from gtk\Graphics\UI\Gtk\General\Structs_hsc_make.c:2:0:
    
d:/Progging/GTK/include/glib-2.0/glib/gutils.h:425:1: warning: "GLIB_CHECK_VERSION" redefined

In file included from <command line>:4:0: 

gtk2hs-config.h:188:1:
     warning: this is the location of the previous definition
In file included from d:/Progging/GTK/include/gtk-2.0/gtk/gtk.h:203,

                 from gtk\Graphics\UI\Gtk\General\Structs_hsc_make.c:2:0:
    
d:/Progging/GTK/include/gtk-2.0/gtk/gtkversion.h:45:1: warning: "GTK_CHECK_VERSION" redefined

In file included from <command line>:4:0: 

gtk2hs-config.h:170:1:
     warning: this is the location of the previous definition
gtk\Graphics\UI\Gtk\General\Structs.hsc: In function `main':

gtk\Graphics\UI\Gtk\General\Structs.hsc:554:0:
     error: cannot convert to a pointer type

gtk\Graphics\UI\Gtk\General\Structs.hsc:554:0:
     error: cannot convert to a pointer type
compiling gtk\Graphics\UI\Gtk\General\Structs_hsc_make.c failed
command was: d:/Progging/ghc/bin/ghc -c -optc-mms-bitfields -optc-g -optc-O2 -optc-mms-bitfields -optc-mms-bitfields -opta-g -opta-O2 -opta-mms-bitfields -opta-mms-bitfields -Id:/Progging/GTK/include/glib-2.0 -Id:/Progging/GTK/lib/glib-2.0/include -Id:/Progging/GTK/include/pango-1.0 -Id:/Progging/GTK/include/glib-2.0 -Id:/Progging/GTK/lib/glib-2.0/include -Id:/Progging/GTK/include/gtk-2.0 -Id:/Progging/GTK/lib/gtk-2.0/include -Id:/Progging/GTK/include/cairo -Id:/Progging/GTK/include/atk-1.0 -optc-include -optcgtk2hs-config.h gtk\Graphics\UI\Gtk\General\Structs_hsc_make.c -o gtk\Graphics\UI\Gtk\General\Structs_hsc_make.o
make[2]: *** [gtk/Graphics/UI/Gtk/General/Structs.hs] Error 1

Change History

Changed 6 years ago by pgavin

  • status changed from new to closed
  • resolution set to fixed

I'm pretty sure I fixed this one.

Note: See TracTickets for help on using tickets.