Silencing a GLib-GObject-WARNING

April 16th, 2007

When gcc tells you something like this…

(process:28965): GLib-GObject-WARNING **: specified instance size for type `MyObject’ is smaller than the parent type’s `GObject’ instance size

& you know that you’ve covered all the possible bugs in your object code - think again! Check your structure definition! Remember - the GObject & GObjectClass members in the object & ObjectKlass have to defined as instance variables, not pointers!

I did this mistake today & was then searching for my error from past 2 hours! Lol :)

BTW, just found out, GOB2 is a nice tool to generate code for glib based objects. I’m soon gonna give it a try :)

Posted in Celunite, Technology | Comments (4)

4 Responses to “Silencing a GLib-GObject-WARNING”

  1. makuchaku Says:

    Considering that, my front page - http://www.makuchaku.info/yes.html will compile but spit out gazillions of warnings when run! I need to correct it… lol

  2. makuchaku Says:

    Fixed!

  3. Sayamindu Says:

    You might want to check out Vala as well.

  4. makuchaku Says:

    Thanks man!

Leave a Reply

*
To prove you're a person (not a spam script), type the security word shown in the picture.
Anti-Spam Image