Re: Compilation error of an example from the gtkmm book



On Tue, 2008-08-05 at 11:39 -0300, Paulo Flabiano Smorigo wrote:
> Hi everyone,
> 
> I'm trying to compile an example from the gtkmm book about drawing
> area but the compilation gives me an "has no member" error".
> The page of the example is:
> http://www.gtkmm.org/docs/gtkmm-2.4/docs/tutorial/html/ch15s02.html
> 
> gcc *.cc -o prog `pkg-config gtkmm-2.4 cairomm-1.0 --cflags --libs`
> 
> myarea.cc: In member function 'virtual bool
> MyArea::on_expose_event(GdkEventExpose*)':
> myarea.cc:45: error: 'class Gdk::Window' has no member named
> 'create_cairo_context'
> 
> What I'm doing wrong?

Your version of gtkmm is probably too old. That method was added in
gtkmm 2.20 apparently:
http://www.gtkmm.org/docs/gtkmm-2.4/docs/reference/html/classGdk_1_1Drawable.html#9d4fb469ceab1175d9d4b788ae034d2e
though it's just possible that it really only appeared in 2.12.

What version of gtkmm do you have?
Try pkg-config gtkmm-2.4 --modversion.

-- 
murrayc murrayc com
www.murrayc.com
www.openismus.com



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