Ticket #1200 (new defect)
Opened 7 years ago
missing symbols when gtk is built with Quartz backend
|Reported by:||guest||Owned by:||somebody|
|Component:||general (Gtk+, Glib)||Version:||0.11.0|
On OS X, if using the quartz backend (http://gtk-osx.sourceforge.net/), gtk2hs will build but any programs built with it fail with the message:
Undefined symbols: "_gdk_x11_drawable_get_xid", referenced from: _s1Spk_info in libHSgtk-0.11.2.a(Structs.o) ld: symbol(s) not found collect2: ld returned 1 exit status
The problem seems to be the function "drawableGetID" defined in Graphics/UI/Gtk/General/Structs.hsc. This function calls
#if !defined(WIN32) withForeignPtr drawable gdk_x11_drawable_get_xid #else withForeignPtr drawable gdk_win32_drawable_get_handle #endif
but gdk_x11_drawable_get_xid is not exported from the Quartz backend. Of course gdk_win32_drawable_get_handle isn't available either.
I don't know which function is the correct replacement on Quartz, but just leaving it out allows programs to link and appear to run properly.