[Gimp-developer] Compiling a Simple Plug-in.

2005-10-25 Thread Yavala
Can anyone show me how to compile the simple Plug-in1 hello' message on GIMP.
The simple plugin for gimp is available at this link
:http://developer.gimp.org/writing-a-plug-in/1/index.html.
I have included one header file called libgimp.h which is similar to  #include
libgimp/gimp.h from the developers website.
 I am using devcpp-4.9.9.2 with mingw compiler for windows. I have 41 error
when trying to compile the Simple Plug-in:
Compiler: Default compiler
Executing  gcc.exe...
gcc.exe D:\New Folder\hello.c -o D:\New Folder\hello.exe   
-ID:\Dev-Cpp\include   -LD:\Dev-Cpp\lib
In file included from D:\New Folder\hello.c:2:

D:\New Folder\/gimp.h:10: error: syntax error before '*' token

D:\New Folder\/gimp.h:22: error: syntax error before gimp_main
D:\New Folder\/gimp.h:22: error: syntax error before argc
D:\New Folder\/gimp.h:23: warning: data definition has no type or storage class

D:\New Folder\/gimp.h:24: error: syntax error before gimp_default_display
D:\New Folder\/gimp.h:24: warning: data definition has no type or storage class
D:\New Folder\/gimp.h:25: error: syntax error before '*' token
D:\New Folder\/gimp.h:38: error: syntax error before '*' token
D:\New Folder\/gimp.h:52: error: syntax error before '*' token
D:\New Folder\/gimp.h:53: error: syntax error before '*' token
D:\New Folder\/gimp.h:53: error: syntax error before '*' token
D:\New Folder\/gimp.h:55: warning: data definition has no type or storage class
D:\New Folder\/gimp.h:56: error: syntax error before '*' token
D:\New Folder\/gimp.h:56: error: syntax error before '*' token
D:\New Folder\/gimp.h:59: warning: data definition has no type or storage class

D:\New Folder\/gimp.h:60: error: syntax error before '*' token

D:\New Folder\/gimp.h:62: error: syntax error before '*' token

D:\New Folder\/gimp.h:64: error: syntax error before gimp_gamma
D:\New Folder\/gimp.h:64: warning: data definition has no type or storage class
D:\New Folder\/gimp.h:65: error: syntax error before gimp_install_cmap
D:\New Folder\/gimp.h:65: warning: data definition has no type or storage class
D:\New Folder\/gimp.h:66: error: syntax error before gimp_use_xshm
D:\New Folder\/gimp.h:66: warning: data definition has no type or storage class
D:\New Folder\/gimp.h:67: error: syntax error before '*' token
D:\New Folder\/gimp.h:67: warning: data definition has no type or storage class
D:\New Folder\/gimp.h:68: error: syntax error before gimp_min_colors
D:\New Folder\/gimp.h:68: warning: data definition has no type or storage class

D:\New Folder\/gimp.h:69: error: syntax error before '*' token

D:\New Folder\/gimp.h:69: warning: data definition has no type or storage class
D:\New Folder\/gimp.h:70: error: syntax error before '*' token
D:\New Folder\hello.c: In function `query':
D:\New Folder\hello.c:6: error: syntax error before args
D:\New Folder\hello.c: At top level:

D:\New Folder\hello.c:25: error: syntax error before string constant
D:\New Folder\hello.c:34: error: conflicting types for 'gimp_install_procedure'
D:\New Folder\/gimp.h:37: error: previous declaration of
'gimp_install_procedure' was here
D:\New Folder\hello.c:34: error: conflicting types for 'gimp_install_procedure'
D:\New Folder\/gimp.h:37: error: previous declaration of
'gimp_install_procedure' was here

D:\New Folder\hello.c:37: error: syntax error before '*' token

D:\New Folder\hello.c: In function `run':
D:\New Folder\hello.c:43: error: syntax error before values
D:\New Folder\hello.c:44: error: `GimpPDBStatusType' undeclared (first use in
this function)
D:\New Folder\hello.c:44: error: (Each undeclared identifier is reported only
once
D:\New Folder\hello.c:44: error: for each function it appears in.)

D:\New Folder\hello.c:45: error: `GimpRunMode' undeclared (first use in this
function)
D:\New Folder\hello.c:48: error: `nreturn_vals' undeclared (first use in this
function)
D:\New Folder\hello.c:49: error: `return_vals' undeclared (first use in this
function)
D:\New Folder\hello.c:49: error: `values' undeclared (first use in this
function)
D:\New Folder\hello.c:51: error: `GIMP_PDB_STATUS' undeclared (first use in this
function)
D:\New Folder\hello.c:52: error: `status' undeclared (first use in this
function)
D:\New Folder\hello.c:56: error: `run_mode' undeclared (first use in this
function)

D:\New Folder\hello.c:56: error: `param' undeclared (first use in this function)
D:\New Folder\hello.c:58: error: `GIMP_RUN_NONINTERACTIVE' undeclared (first use
in this function)

Execution terminated

-- 
Yavala






This message was sent using IMP, the Internet Messaging Program.
___
Gimp-developer mailing list
Gimp-developer@lists.xcf.berkeley.edu
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer


[Gimp-developer] Compiling a Simple Plug-in.

2005-10-25 Thread Tor Lillqvist
Yavala writes:
  Can anyone show me how to compile the simple Plug-in1 hello' message on 
  GIMP.
  The simple plugin for gimp is available at this link
  http://developer.gimp.org/writing-a-plug-in/1/index.html.

I don't see any complete source code on that page, unfortunately. What
did you do, paste together the code snippets on the page?

  I have included one header file called libgimp.h which is similar
  to #include libgimp/gimp.h from the developers website.

So you say, but then the error messages you include below talk about
gimp.h?

  gcc.exe D:\New Folder\hello.c -o D:\New Folder\hello.exe   

Hmm, actually using a folder called New Folder does not seem like a
terribly bright idea. You are supposed to rename folders you create to
some meaningful name. I would also recommend not using spaces in
folder names, it can cause various problems sooner or later.

  D:\New Folder\/gimp.h:10: error: syntax error before '*' token

Is this gimp.h something you created yourself, or where did you get it
from? And why is it in New Folder? If it is the standard gimp.h from
a GIMP distribution, it should be in a subfolder
include\gimp-2.0\libgimp of where you installed the GIMP developer
files [1]. Anyway, the normal gimp.h has about twenty lines of
comments at the beginning, so how can line 10 have a syntax error?

--tml

[1] There doesn't seem to be any GIMP development package for Win32 at
the gimp-win.sf.net site.

There is one at http://www.gimp.org/win32/gimp-dev-2.2.7.zip . Maybe
it should be advertised somewhere, although I initially intended it to
be just temporary until gimp-win.sf.net would offer also a developer
package. If you haven't already gathered the same headers and import
libraries from somewhere else, you probably want to download that and
point your compiler to use headers and (import) libraries from there.

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