RSS/Atom feed Twitter
Site is read-only, email is disabled

Hacking gimp

This discussion is connected to the gimp-developer-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.

This is a read-only list on gimpusers.com so this discussion thread is read-only, too.

3 of 3 messages available
Toggle history

Please log in to manage your subscriptions.

Hacking gimp Jordan Stinson 02 Jun 02:14
  Hacking gimp Martin Nordholts 02 Jun 05:43
   Hacking gimp Jordan Stinson 02 Jun 17:11
Jordan Stinson
2009-06-02 02:14:45 UTC (over 15 years ago)

Hacking gimp

Hi, I'm attempting to add new files to the app/widgets directory. I've added a .h and a .c file and the compiler tries to compile it. I seem to be able to compile code in these files however, when I try to include "gimp.h", I get an error in gimpobject.h line 35 saying something like, "expected specifier-qualifier-list before 'GObject'" I'm not sure what I'm doing wrong and I can't seem to find anything on the gimp developer site or in any of the archives for the mailing list. Is there a prescribed way to add files? If so, where can I find this information?

Thanks, Jordan

Martin Nordholts
2009-06-02 05:43:06 UTC (over 15 years ago)

Hacking gimp

Jordan Stinson wrote:

Hi,
I'm attempting to add new files to the app/widgets directory. I've added a .h and a .c file and the compiler tries to compile it. I seem to be able to compile code in these files however, when I try to include "gimp.h", I get an error in gimpobject.h line 35 saying something like, "expected specifier-qualifier-list before 'GObject'" I'm not sure what I'm doing wrong and I can't seem to find anything on the gimp developer site or in any of the archives for the mailing list. Is there a prescribed way to add files? If so, where can I find this information?

Hi!

This doesn't sound like an add-file problem but an include-problem. More specifically, it seems that you include gimp.h before the GObject header is pulled in. Did you read the GIMP include policy in devel-docs/includes.txt? You can see how other files in the app/widgets dir include gimp.h, for example gimpcolordialog.c. That file, like most files in that dir, includes the GObject header indirectly by pulling in the GTK+ header:

#include

and then after widgets-types.h comes gimp.h:

#include "core/gimp.h"

Let us know if you need further assistance.

Best regards, Martin

Jordan Stinson
2009-06-02 17:11:26 UTC (over 15 years ago)

Hacking gimp

Hi,
Thanks! That's exactly what I needed.

- Jordan

On Mon, Jun 1, 2009 at 11:44 PM, Martin Nordholts wrote:

Jordan Stinson wrote:

Hi,
I'm attempting to add new files to the app/widgets directory. I've added a .h and a .c file and the compiler tries to compile it. I seem to be able to compile code in these files however, when I try to include "gimp.h", I get an error in gimpobject.h line 35 saying something like, "expected specifier-qualifier-list before 'GObject'" I'm not sure what I'm doing wrong and I can't seem to find anything on the gimp developer site or in any of the archives for the mailing list. Is there a prescribed way to add files? If so, where can I find this information?

Hi!

This doesn't sound like an add-file problem but an include-problem. More specifically, it seems that you include gimp.h before the GObject header is pulled in. Did you read the GIMP include policy in devel-docs/includes.txt? You can see how other files in the app/widgets dir include gimp.h, for example gimpcolordialog.c. That file, like most files in that dir, includes the GObject header indirectly by pulling in the GTK+ header:

#include

and then after widgets-types.h comes gimp.h:

#include "core/gimp.h"

Let us know if you need further assistance.

Best regards, Martin