Re: Trouble with create_cairo_context

Mark Tilford wrote:
On Sat, Sep 27, 2008 at 1:55 PM, Mark Tilford <ralphmerridew gmail com> wrote:
Anybody ever figure out what caused this problem?  I can't get the
clock example to work:

~/src/gtk/clock$ g++ `pkg-config --cflags --libs gtkmm-2.4`
`pkg-config --cflags --libs cairomm-1.0` -g
~/src/gtk/clock$ ./a.out
./a.out: symbol lookup error: ./a.out: undefined symbol:

I found a workaround:
Instead of
m_cairo_context = widget.get_window()->create_cairo_context();
m_cairo_context = Cairo::RefPtr<Cairo::Context>(new

In case anybody else runs into the same problem.
gtkmm-list mailing list
gtkmm-list gnome org

You're probably trying to link against a too-old version of gtkmm (?) I believe the gdk_cairo_create() function was added in GTK+ 2.6, but it wasn't wrapped until the next release of gtkmm (due to the fact that cairomm wasn't yet stable in time for gtkmm-2.6)

* I might not have the version numbers exactly correct, but I know for sure that there was a 1-version gap between when cairo support was added to GTK+ and when it was added to gtkmm.


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