WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: gtkglextmm  (Read 3739 times)

Offline robc

  • Sr. Member
  • ****
  • Posts: 447
"Never give up! Never surrender!" - Commander Peter Quincy Taggart

"Make it so." - Captain Picard

Offline robc

  • Sr. Member
  • ****
  • Posts: 447
Re: gtkglextmm
« Reply #1 on: January 05, 2011, 01:54:53 PM »
This will not build with the gtkmm in the repo. gtkmm needs to be updated to the same version as gtk+. Some functions have been deprecated which prevents the build of gtkglextmm.
"Never give up! Never surrender!" - Commander Peter Quincy Taggart

"Make it so." - Captain Picard

Online Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14841
Re: gtkglextmm
« Reply #2 on: January 05, 2011, 10:37:42 PM »
gtk2 is 2.22.1 and gtkmm is 2.22.0 - is the .1 making the difference?

Offline robc

  • Sr. Member
  • ****
  • Posts: 447
Re: gtkglextmm
« Reply #3 on: January 06, 2011, 02:08:00 PM »
I am getting this error when attempting to compile gtkglextmm:
Quote
/usr/local/include/gdkmm-2.4/gdkmm/region.h:267: error: 'GdkSpanFunc' has not been declared

That function has been deprecated since 2.22:
http://library.gnome.org/devel/gdk/stable/gdk-Points-Rectangles-and-Regions.html#GdkSpanFunc
From region.h:
lines 30-37:
Code: [Select]
// We use GdkSpanFunc in the (deprecated) API, so we must temporarily undef GDK_DISABLE_DEPRECATED.
// We shouldn't have used that C type in the API anyway, but we can't break API.
// Temporarily undef GDK_DISABLE_DEPRECATED, redefining it later if appropriate.
// We need this to use _GtkBoxChild, which we use in our (deprecated) API.
#if defined(GDK_DISABLE_DEPRECATED) && !defined(GTKMM_GDK_DISABLE_DEPRECATED_UNDEFED)
#undef GDK_DISABLE_DEPRECATED
#define GTKMM_GDK_DISABLE_DEPRECATED_UNDEFED 1
#endif
lines 258-267:
Code: [Select]
  /** Calls a function on each span in the intersection of @a region and @a spans.
   *
   * Deprecated: 2.22: There is no replacement.
   * @param spans An array of Gdk::Spans.
   * @param n_spans The length of @a spans.
   * @param sorted <tt>true</tt> if @a spans is sorted wrt. the y coordinate.
   * @param function Function to call on each span in the intersection.
   * @param data Data to pass to @a function.
   */
  void spans_intersect_foreach(GdkSpan* spans, int n_spans, bool sorted, GdkSpanFunc function, gpointer data);

Here is a dumb question...why are they using it after they deprecated it?

I was able to get around this by removing -DGDK_DISABLE_DEPRECATED from gtkglext/gtkmm/gl/Makefile
"Never give up! Never surrender!" - Commander Peter Quincy Taggart

"Make it so." - Captain Picard