GNOME Bugzilla – Bug 764263
Missing _GTK_SOURCE_EXTERN in gtksourceview/gtksourceversion.h.in
Last modified: 2016-03-30 07:18:36 UTC
Created attachment 324842 [details] [review] Added missing _GTK_SOURCE_EXTERN in gtksourceview/gtksourceversion.h.in Due to missing _GTK_SOURCE_EXTERN after G_DEPRECATED and G_DEPRECATED_FOR, dllexport never gets added when compiling on MSYS2. This leads to missing deprecated functions in the gtksourceview dll. See also https://bugzilla.gnome.org/show_bug.cgi?id=764233 where this issue was first reported. The attached patch fixes this.
If not already done, someone needs to test that the deprecation warnings are still triggered (on Linux too).
Regarding testing if the deprecation warnings are still triggered, on MSYS2 I get the following output when compiling with the deprecated gtk_source_gutter_get_window (after applying the attached patch of course): $ make Scanning dependencies of target gui_example [ 33%] Building CXX object CMakeFiles/gui_example.dir/main.cpp.obj C:/msys64/home/ole/gui_example/main.cpp: In function 'int main()': C:/msys64/home/ole/gui_example/main.cpp:49:3: warning: 'GdkWindow* gtk_source_gutter_get_window(GtkSourceGutter*)' is deprecated: Use 'gtk_text_view_get_window' instead [-Wdeprecated-declarations] gtk_source_gutter_get_window(NULL); ^ In file included from C:/msys64/mingw64/include/gtksourceview-3.0/gtksourceview/gtksource.h:35:0, from C:/msys64/home/ole/gui_example/main.cpp:5: C:/msys64/mingw64/include/gtksourceview-3.0/gtksourceview/gtksourcegutter.h:56:12: note: declared here GdkWindow *gtk_source_gutter_get_window (GtkSourceGutter *gutter); ^ C:/msys64/home/ole/gui_example/main.cpp:49:3: warning: 'GdkWindow* gtk_source_gutter_get_window(GtkSourceGutter*)' is deprecated: Use 'gtk_text_view_get_window' instead [-Wdeprecated-declarations] gtk_source_gutter_get_window(NULL); ^ In file included from C:/msys64/mingw64/include/gtksourceview-3.0/gtksourceview/gtksource.h:35:0, from C:/msys64/home/ole/gui_example/main.cpp:5: C:/msys64/mingw64/include/gtksourceview-3.0/gtksourceview/gtksourcegutter.h:56:12: note: declared here GdkWindow *gtk_source_gutter_get_window (GtkSourceGutter *gutter); ^ C:/msys64/home/ole/gui_example/main.cpp:49:36: warning: 'GdkWindow* gtk_source_gutter_get_window(GtkSourceGutter*)' is deprecated: Use 'gtk_text_view_get_window' instead [-Wdeprecated-declarations] gtk_source_gutter_get_window(NULL); ^ In file included from C:/msys64/mingw64/include/gtksourceview-3.0/gtksourceview/gtksource.h:35:0, from C:/msys64/home/ole/gui_example/main.cpp:5: C:/msys64/mingw64/include/gtksourceview-3.0/gtksourceview/gtksourcegutter.h:56:12: note: declared here GdkWindow *gtk_source_gutter_get_window (GtkSourceGutter *gutter); ^ [ 66%] Building CXX object CMakeFiles/gui_example.dir/dispatcher.cpp.obj [100%] Linking CXX executable gui_example.exe [100%] Built target gui_example
Thanks! Attachment 324842 [details] pushed as 26cb6d4 - Added missing _GTK_SOURCE_EXTERN in gtksourceview/gtksourceversion.h.in