Re: [gtkmm] *_get_type() scope during wrapping API



> >>During source compilation, the compiler stops because  it cannot find 
> >>the  *_get_type() that is wrap_init.cc
> >>    
> >>
> >
> >I don't understand "get_type() that is wrap_init.cc". If you show us the
> >exact error message then I might be able to help more. It's probably
> >simple. If it's in CVS, I can look there too.
> >  
> >
> I put "online" the code: http://paro.homeunix.org/web/diacanvasmm.tgz

Great. I'm reading and replying offline now, but maybe I can look at
that later

> The error during compilation is
> 
> -I/usr/include/sigc++-1.2 -I/usr/include/glib-2.0 
> -I/usr/lib/glib-2.0/include -I/usr/lib/gtk-2.0/include 
> -I/usr/include/pango-1.0 -I/usr/X11R6/include -I/usr/include/freetype2 
> -I/usr/include/atk-1.0 -I/usr/include/libgnomecanvas-2.0 
> -I/usr/include/libgnomeprint-2.2 -I/usr/include/libart-2.0 
> -I/usr/include/libxml2 -g -O2 -Wp,-MD,.deps/bezier.pp -c bezier.cc  
> -fPIC -DPIC -o bezier.lo
> bezier.cc: In member function `const Glib::Class&
>    Dia::Canvas::Bezier_Class::init()':
> bezier.cc:70: error: `dia_type_canvas_bezier_get_type' undeclared (first use
>    this function)
> bezier.cc:70: error: (Each undeclared identifier is reported only once 
> for each
>    function it appears in.)
> make[4]: *** [bezier.lo] Error 1
> make[4]: Leaving directory `/home/gnome/diacanvasmm/diacanvas/diacanvasmm'
> make[3]: *** [all-recursive] Error 1
> make[3]: Leaving directory `/home/gnome/diacanvasmm/diacanvas/diacanvasmm'
> 
> The function is "autocreated" in wrap_init.cc

But it looks like a C function - probably part of libdiacanvas. Maybe
you just need to #include the appropriate C function from your .ccg
file.

I am not looking at the dia code now, but there is another possibility:
Sometimes the C *_get_type() functions have unusual names. For instance,
gmmproc might expect dia_type_canvas_bezier_get_type(), but the relevant
function might actually be called diatypecanvas_bezier_get_type().

But the dia_type part of dia_type_canvas_bezier_get_type() looks strange
to me. If your class is called Dia::Canvas::Bezier, then I would expect
the C type to be DiaCanvasBezier, with a dia_canvas_bezier_get_type()
function. Maybe the arguments to your CLASS_*() macro in the .hg file
are wrong.

> I use cvs version of diacanvas, but I think that it will work also with  
> tgz.
> 
> The code of the wrapper is in early stage.

-- 
Murray Cumming
www.murrayc.com
murrayc murrayc com




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