Re: simple and easy way - gmmproc to wrap a single gobject?



I'm also studying gmmproc at the moment in order to allow us the wrapping of specific GStreamer elements for gstreamermm.

In order to do what you want, you will unfortunately need not only the m4 files, which (for plain GObject stuff) glibmm installs into $libdir/glibmm-$VERSION/proc/m4, and gtkmm installs its into $libdir/gtkmm-$VERSION/proc/m4, but also the installed .defs, which neither doesn't install at the moment (i've changed gstreamermm to install its defs into $libdir/gstreamermm-$VERSION/proc/defs).

Assuming you  _have_ the defs somewhere, for example in $libdir/glibmm-$VERSION/proc/defs (e.g. /usr/lib/gibmm-2.4/proc/defs), you can convert a single object, for example with input files 'myobjectclass.hg' and 'myobjectclass.ccg' like this:

/usr/lib/glibmm-2.4/proc/gmmproc -I /usr/lib/glibmm-2.4/proc/m4 --defs /usr/lib/glibmm-2.4/proc/defs/ myobject . .

There is another problem that AFAIK right now (i might be wrong), you can specify only one m4 directory at any given time, perhaps the glibmm one is searched by default, i'm not sure right now; i didn't try the above like with a _gtk_ class, only with glib-only code (i assume it does look for the glibmm m4's by default though because the above line works for a single gstreamermm class).

The . and . at the end of the command line mean that the input dir will be the output dir (i.e. .h and .cc will be created where .hg and .ccg are).

You can get the defs from the glibmm source tarball, in $top_srcdir/glib/src/*.defs

HTH


2008/7/31 Christopher Lang <christopher lang acurana de>

Hi,

is there a simple way, e.g. without using autotools just by using command line
gmmproc to wrap a single gobject?

The chapter in the book:

http://www.gtkmm.org/docs/gtkmm-2.4/docs/tutorial/html/chapter-wrapping-c-libraries.html

looks like a lot of work for just one small gobject.

What is the absolute minimum of files to get gmmproc to produce a c++ class?

Will:

source.c
source.h
source.ccg
source.hg

do?

Is there anything else mandatory? Do I really need that defs stuff?

Is there a "bare minimum example" somewhere that does not require autotools?

Lots of questions...

thanks in advance

cheers
Chris


http://www.acurana.de/

_______________________________________________
gtkmm-list mailing list
gtkmm-list gnome org
http://mail.gnome.org/mailman/listinfo/gtkmm-list



--
Please note that according to the German law on data retention,
information on every electronic information exchange with me is
retained for a period of six months.
[Bitte beachten Sie, dass dem Gesetz zur Vorratsdatenspeicherung zufolge
jeder elektronische Kontakt mit mir sechs Monate lang gespeichert wird.]


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