rhx / SwiftGtk

A Swift wrapper around gtk-3.x and gtk-4.x that is largely auto-generated from gobject-introspection
https://rhx.github.io/SwiftGtk/
BSD 2-Clause "Simplified" License
317 stars 26 forks source link

swift build not working in ubuntu 22.04 ,ncompatible integer to pointer conversion returning 'GType' #60

Closed A373k closed 6 months ago

A373k commented 6 months ago

: error: incompatible integer to pointer conversion returning 'GType' (aka 'unsigned long') from a function with result type 'GTypeClass ' (aka 'struct _GTypeClass ') [-Wint-conversion] return G_TYPE_FROM_INSTANCE(gobject); ^~~~~~~~~ /usr/include/glib-2.0/gobject/gtype.h:619:65: note: expanded from macro 'G_TYPE_FROM_INSTANCE'

define G_TYPE_FROM_INSTANCE(instance) (G_TYPE_FROM_CLASS (((GTypeInstance*) (instance))->g_class))

                                                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

1 error generated. [2/7] Converting Gtk Gtk-3.0.gir

rhx commented 6 months ago

Thanks for reporting, this should be fixed now. This was actually an issue in SwiftGObject, not SwiftGtk, so if you are on the main or gtk4 branch, make sure you update your dependencies before rebuilding, i.e.:

rm -rf .build
swift package purge-cache
swift package update