Re: Trouble with create_cairo_context



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 clock.cc main.cc
> ~/src/gtk/clock$ ./a.out
> ./a.out: symbol lookup error: ./a.out: undefined symbol:
> _ZN3Gdk8Drawable20create_cairo_contextEv
>

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

In case anybody else runs into the same problem.


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