[no subject]

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

 



Yavala writes:
 > Can someone help me with the simple plug-in (hello message
 > box)http://developer.gimp.org/writing-a-plug-in/1/index.html?

Well, the most obvious error is that there is no initial '#' character
on the line where you try to include libgimp/gimp.h. (Have you never
programmed in C before?) It should look like this:

#include "libgimp/gimp.h"

You also need to have the PLUG_IN_INFO array and MAIN(). Add the
following to the bottom of the source file:

GimpPlugInInfo PLUG_IN_INFO =
{
  NULL,  /* init_proc  */
  NULL,  /* quit_proc  */
  query, /* query_proc */
  run,   /* run_proc   */
};

MAIN ()

The menu path to the plug-in that is passed to
gimp_install_procedure() needs to start with <Image>. Change it as
follows:

          gimp_install_procedure (
            "plug_in_hello",
            "Hello, world!",
            "Displays \"Hello, world!\" in a dialog",
            "David Neary",
            "Copyright David Neary",
            "2004",
            "<Image>/Filters/Misc/Hello world...",
            "RGB*, GRAY*",
            GIMP_PLUGIN,
            G_N_ELEMENTS (args), 0,
            args, NULL);
        }

With these changes your plug-in compiles and works fine with GIMP 2.2.

--tml

_______________________________________________
Gimp-developer mailing list
Gimp-developer@xxxxxxxxxxxxxxxxxxxxxx
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer

[Index of Archives]     [Video For Linux]     [Photo]     [Yosemite News]     [gtk]     [GIMP for Windows]     [KDE]     [GEGL]     [Gimp's Home]     [Gimp on GUI]     [Gimp on Windows]     [Steve's Art]

  Powered by Linux