Re: window.cc:950:117: error: invalid conversion from 'guint {aka unsigned int}' to 'GdkWindowHints'



Am 2015-02-26 02:42, schrieb YuGiOhJCJ Mailing-List:
Hello,

I try to compile gtkmm-3.10.1:
$ ./configure --prefix=/usr
$ make
make  all-recursive
[...]
-I/usr/include/gdk-pixbuf-2.0 -I/usr/include/harfbuzz -Wall -g -O2 -MT
window.lo -MD -MP -MF .deps/window.Tpo -c window.cc  -fPIC -DPIC -o
.libs/window.o
window.cc: In static member function 'static void
Gdk::Window::constrain_size(const Geometry&, guint, int, int, int&,
int&)':
window.cc:950:117: error: invalid conversion from 'guint {aka unsigned
int}' to 'GdkWindowHints' [-fpermissive]
   gdk_window_constrain_size(const_cast<GdkGeometry*>(&(geometry)),
flags, width, height, &(new_width), &(new_height));

                                              ^
In file included from /usr/include/gtk-3.0/gdk/gdktestutils.h:26:0,
                 from /usr/include/gtk-3.0/gdk/gdk.h:54,
                 from ../gdkmm/color.h:36,
                 from ../gdkmm/dragcontext.h:30,
                 from ../gdkmm/window.h:31,
                 from window.cc:9:
/usr/include/gtk-3.0/gdk/gdkwindow.h:1053:12: error:   initializing
argument 2 of 'void gdk_window_constrain_size(GdkGeometry*,
GdkWindowHints, gint, gint, gint*, gint*)' [-fpermissive]
 void       gdk_window_constrain_size      (GdkGeometry    *geometry,
            ^
[...]
I am on Slackware 14.1 and I am using:
-glibmm-2.38.2
-gtk+3-3.14.9
-gdk-pixbuf2-2.30.8
-pango-1.36.8-i486
-atk-2.14.0-i486
-glib2-2.42.1-i486

Do you see how to resolve this problem please?

If you want to use the version combination, you'll need a cast.
GdkWindowHints is an enum. You can cast the int to a GdkWindowHints at window.cc:950:117.
I don't know if there are some more problems after this.
Maybe try to use a newer gtkmm version.

http://ftp.gnome.org/pub/GNOME/sources/gtkmm/

3.14 should do it.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]