GNOME Bugzilla – Bug 761829
undefined reference to `gdk_mir_display_get_type'
Last modified: 2016-02-11 12:30:41 UTC
Created attachment 320804 [details] conftest in some other project i got problems with GDK MIR that the "gdk_mir_display_get_type" function is not found. a readelf does show that libgdk-3.so should have that function: readelf -a /usr/lib/x86_64-linux-gnu/libgdk-3.so | grep gdk_mir 1128: 0000000000083470 89 FUNC GLOBAL DEFAULT 11 gdk_mir_display_get_mir_c 1186: 0000000000088b40 90 FUNC GLOBAL DEFAULT 11 gdk_mir_window_get_mir_su 1225: 0000000000087200 129 FUNC GLOBAL DEFAULT 11 gdk_mir_window_get_type 1232: 0000000000084d60 129 FUNC GLOBAL DEFAULT 11 gdk_mir_gl_context_get_ty 1507: 0000000000083210 129 FUNC GLOBAL DEFAULT 11 gdk_mir_display_get_type building test: LANG=C g++ -o conftest `pkg-config --cflags --libs mirclient` `pkg-config --cflags --libs gtk+-mir-3.0` -x c++ conftest.c conftest.c:(.text+0x38): undefined reference to `gdk_mir_display_get_type()' collect2: error: ld returned 1 exit status pkg-config does add -lgdk-3 but still somehow the conftest does say that it cant find that function (means it renders my other projects useless) Ubuntu Wily package version: 3.16.7-0ubuntu3.3
I don't think there is anything for us to do here. You'll have to debug you build setup yourself, and then take it up with Ubuntu if there is a problem with their GTK+ package.
EDIT: i think i found the solution https://github.com/wxWidgets/wxWidgets/commit/1908c41f36880b9b8f55c0abb25d3d80700b2193 it says: "gdkmir.h header is missing extern "C" wrapper as of GTK+ 3.18.7" while my conftest still does not work, even with extern "C", my project where i needed that check does seems to work again. i don't know if you guys need to change something about it or not.
Created attachment 320866 [details] [review] mir: Add C++ guards Avoid missing symbols when compiling C++ including the GDK Mir backend header.
Coded blind, but this should work. Feel free to re-open if it didn't.
Ah, good to know. Thanks