diamondburned/gotk4

MSYS2 - conflicting types for 'callbackDelete'

webracer999 opened this issue · 2 comments

Build error (using github.com/diamondburned/gotk4/pkg v0.0.0-20220221063304-bbd86ac49f1b or github.com/diamondburned/gotk4/pkg v0.0.0-20220529201008-66c7fe5d2b7c), when building with MSYS2:

$ go build -v
github.com/diamondburned/gotk4/pkg/core/gbox
# github.com/diamondburned/gotk4/pkg/core/gbox
In file included from _cgo_export.c:4:
cgo-gcc-export-header-prolog:43:35: error: conflicting types for 'callbackDelete'; have 'void(GoUintptr)' {aka 'void(long long unsigned int)'}
box.go:6:14: note: previous declaration of 'callbackDelete' with type 'void(guintptr)' {aka 'void(long unsigned int)'}
_cgo_export.c:24:28: error: conflicting types for 'callbackDelete'; have 'void(GoUintptr)' {aka 'void(long long unsigned int)'}
   24 | __declspec(dllexport) void callbackDelete(GoUintptr ptr)
      |                            ^~~~~~~~~~~~~~
box.go:6:14: note: previous declaration of 'callbackDelete' with type 'void(guintptr)' {aka 'void(long unsigned int)'}

For example when building https://github.com/diamondburned/gotk4-examples/blob/master/gtk4/simple/

Are you on a 32-bit platform or have a 32-bit msys by any chance? 32-bit anything?

Thank you for your help.
I've accidentally started "MSYS2 MSYS" instead of "MSYS2 MinGW 64-bit". Now it's working! :)