Starting to code a plug-in under Windows
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.
Starting to code a plug-in under Windows | Alessandro Francesconi | 20 Oct 15:52 |
Starting to code a plug-in under Windows | Jernej Simončič | 20 Oct 17:13 |
gimp taking out X on kubuntu 9.04 | gg@catking.net | 27 Oct 13:09 |
gimp taking out X on kubuntu 9.04 | Alexia Death | 27 Oct 17:31 |
SNT102-W64D67B0D6666ABF4087... | 21 Oct 00:28 | |
Starting to code a plug-in under Windows | Alessandro Francesconi | 21 Oct 00:27 |
Starting to code a plug-in under Windows | "Jernej Simon | 21 Oct 16:24 |
Starting to code a plug-in under Windows
Date: Wed, 20 Oct 2010 17:53:26 +0200
Mime-Version: 1.0
Content-Type: text/plain;
charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
Content-ID:
=0D
Hello guys, I'm a student and I'm curious about developing a plugin and c=
ompile it under Windows (7 - 64bit) systems.=0D
=0D
So, I always try to use Visual Studio 2008 for convenience, and (before s=
tarting with that guide http://developer.gimp.org/writing-a-plug-in/1/ind=
ex.html) I tried to find a sort of "tutorial" to prepare the environment =
to code with libgimp and so on...=0D
=0D
=0D
=0D
But i encountered lots of difficulties :(=0D
=0D
I'm at this point:=0D
=0D
=0D
=0D
- I downloaded the GIMP Source Code from here ftp://ftp.gimp.org/pub/gimp=
/v2.6/, and I extracted it to have all the needed libraries (like libgimp=
/gimp.h, ....).=0D
=0D
- Downloaded also Glib and Gtk sources=0D
=0D
- ... tried to link all the required libraries and to compile the "hello.=
c" plugin described in the developer.gimp.org guide... with no success ca=
use it gave me lots of linking errors=0D
=0D
=0D
=0D
Let me say it... it's very difficult to start a GIMP plugin for a "gimp-d=
ev beginner" that however has years of coding behind, it seems that there=
is no documentation!=0D
=0D
So...is there a wiki to start coding under that environment? Or better...=
an SDK?=0D
=0D
=0D
=0D
thank u so much=0D
=
Starting to code a plug-in under Windows
On Wednesday, October 20, 2010, 17:52:45, Alessandro Francesconi wrote:
So, I always try to use Visual Studio 2008 for convenience
Unfortunately, this probably won't be easy to get to work with Visual Studio - both GIMP and GTK+ are compiled the mingw toolchain on Windows, and while there are some Visual Studio projects in the source, they're not maintained as far as I know.
Setting up an environment to compile GIMP on Windows isn't easy either, although once you have it set up, it'll just work.
In my experience it's both easier and faster to actually cross-compile GIMP from Linux, than to bother with the MSys or Cygwin environments on Windows (if you decide to compile on Windows, avoid cygwin, and use MSys instead).
When compiling GIMP (or it's plug-ins), you'll want to compile as
little as possible yourself - in my current stable installers, I only
compile GIMP, gegl and babl myself, while the rest comes either from
or from the package's
website. For the unstable/experimental installers I only compile GIMP
- everything else is from SuSE's repository at
The easiest way to set up environment for compiling GIMP's plug-ins is to download the GTK+ bundle from
and import libraries for GIMP, babl and gegl from
There are some other dependencies if you wish to compile GIMP itself, but I think this should suffice for plug-in development.
Extract all files to the same prefix, keeping the directory structure. If you're cross-compiling you'll have to fix the prefix path in all .pc files in lib/pkgconfig/ (the Windows version of pkg-config should automatically select the prefix for you). This is basically it, now you just need to set PKG_CONFIG_PATH environment variable to point to /lib/pkgconfig and PATH to include /bin, and you should be ready to go.
Starting to code a plug-in under Windows
Date: Thu, 21 Oct 2010 02:28:12 +0200
Mime-Version: 1.0
Content-Type: text/plain;
charset=iso-8859-2
Content-Transfer-Encoding: quoted-printable
Content-ID:
=0D
=0D
=0D
=0D
Hey thank u so much for your help, it's very useful!=0D
Now I understood what I'd miss, and I downloaded all the packages you sai=
d plus the MinGW installer.=0D
So... now I teorically have gcc ready on my C:\MinGW\bin directory, but i=
t seems that gimptool-2.0 doesn't find it=0D
I type: gimptool-2.0.exe --build hello.c=0D
Result: "i686-pc-mingw32-gcc" is not a valid command.=0D
I think that the executable "i686-pc-mingw32-gcc" doesn't exists, and it =
can be right, cause the unique gcc program I have is C:\MinGW\bin\gcc.exe=
=0D
Where I can get i686-pc-mingw32-gcc?=0D
> Date: Wed, 20 Oct 2010 19:13:32 +0200=0D
From: jernej@ena.si=0D
To: gimp-developer@lists.XCF.Berkeley.EDU=0D Subject: Re: [Gimp-developer] Starting to code a plug-in under Windows=0D=
=0D
On Wednesday, October 20, 2010, 17:52:45, Alessandro Francesconi wrote:=
=0D
=0D
So, I always try to use Visual Studio 2008 for convenience=0D
=0D
Unfortunately, this probably won't be easy to get to work with Visual=0D=
Studio - both GIMP and GTK+ are compiled the mingw toolchain on=0D Windows, and while there are some Visual Studio projects in the=0D source, they're not maintained as far as I know.=0D =0D
Setting up an environment to compile GIMP on Windows isn't easy=0D either, although once you have it set up, it'll just work.=0D =0D
In my experience it's both easier and faster to actually cross-compile=0D=
GIMP from Linux, than to bother with the MSys or Cygwin environments=0D=
on Windows (if you decide to compile on Windows, avoid cygwin, and use=0D=
MSys instead).=0D
=0D
When compiling GIMP (or it's plug-ins), you'll want to compile as=0D little as possible yourself - in my current stable installers, I only=0D=
compile GIMP, gegl and babl myself, while the rest comes either from=0D=
or from the package's=0D=
website. For the unstable/experimental installers I only compile GIMP=0D=
- everything else is from SuSE's repository at=0D
/noarch/>=0D
=0D
The easiest way to set up environment for compiling GIMP's plug-ins is=0D=
to download the GTK+ bundle from=0D
22.0-20101016_win32.zip>=0D
and import libraries for GIMP, babl and gegl from=0D
stable%20release)/GIMP%202.6.4%20%2B%20GTK%2B%202.14.6/gimp-dev-2.6.4.zip= /download>=0D
stable%20release)/GIMP%202.6.4%20%2B%20GTK%2B%202.14.6/gegl-2847-babl-359= -dev.zip/download>=0D
There are some other dependencies if you wish to compile GIMP itself,=0D=
but I think this should suffice for plug-in development.=0D =0D
Extract all files to the same prefix, keeping the directory structure.=0D=
If you're cross-compiling you'll have to fix the prefix path in all=0D .pc files in lib/pkgconfig/ (the Windows version of pkg-config should=0D=
automatically select the prefix for you). This is basically it, now=0D you just need to set PKG_CONFIG_PATH environment variable to point to=0D=
/lib/pkgconfig and PATH to include /bin, and you=0D should be ready to go.=0D
=0D
-- =0D
< Jernej Simon=E8i=E8 ><><><><>< http://eternallybored.org/ >=0D =0D
It's better to retire too soon than too late.=0D -- Mosher's Law=0D
=0D
_______________________________________________=0D Gimp-developer mailing list=0D
Gimp-developer@lists.XCF.Berkeley.EDU=0D https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer=0D
=
Starting to code a plug-in under Windows
On Thursday, October 21, 2010, 2:27:28, Alessandro Francesconi wrote:
Where I can get i686-pc-mingw32-gcc?
Copy gcc.exe to i686-pc-mingw32-gcc.exe (and do the same for at least g++.exe, cpp.exe and ld.exe).
< Jernej Simon
gimp taking out X on kubuntu 9.04
Hi,
I have a kubuntu 9.04 x86-64 installation that I maintain remotely via vnc. It has all current updates.
Gimp on this system has always been very unstable. Almost nothing can be done without a big ugly crash that takes out the X server completely.
The simplest thing seems to be just to click on a newly opened image. It's that bad!
here's the end of Xorg.0.log after a crash.
(II) intel(0): Using vrefresh ranges from config file
(II) intel(0): Printing DDC gathered Modelines:
(II) intel(0): Modeline "1366x768"x0.0 72.30 1366 1414 1446 1526 768
771 77$
(II) intel(0): EDID vendor "LGD", prod id 25345
Backtrace:
0: /usr/X11R6/bin/X(xorg_backtrace+0x26) [0x4f1b66]
1: /usr/X11R6/bin/X(xf86SigHandler+0x41) [0x485a61]
2: /lib/libc.so.6 [0x7f2039067040]
3: /usr/X11R6/bin/X(DeleteInputDeviceRequest+0x56) [0x496786]
4: /usr/X11R6/bin/X(CloseDownDevices+0x59) [0x447079]
5: /usr/X11R6/bin/X(main+0x40b) [0x433ddb]
6: /lib/libc.so.6(__libc_start_main+0xe6) [0x7f20390525a6]
7: /usr/X11R6/bin/X [0x433219]
Saw signal 11. Server aborting.
Help | About tells me 2.6.6
ldd does not seem to show any missing libs:
linux-vdso.so.1 => (0x00007fffb4bd8000)
libgimpwidgets-2.0.so.0 => /usr/lib/libgimpwidgets-2.0.so.0
(0x00007fde22606000)
libgimpmodule-2.0.so.0 => /usr/lib/libgimpmodule-2.0.so.0
(0x00007fde22401000)
libgimpcolor-2.0.so.0 => /usr/lib/libgimpcolor-2.0.so.0
(0x00007fde221f4000)
libgimpthumb-2.0.so.0 => /usr/lib/libgimpthumb-2.0.so.0
(0x00007fde21fea000)
libgimpmath-2.0.so.0 => /usr/lib/libgimpmath-2.0.so.0
(0x00007fde21de4000)
libgimpconfig-2.0.so.0 => /usr/lib/libgimpconfig-2.0.so.0
(0x00007fde21bd4000)
libgimpbase-2.0.so.0 => /usr/lib/libgimpbase-2.0.so.0
(0x00007fde219bc000)
libgtk-x11-2.0.so.0 => /usr/lib/libgtk-x11-2.0.so.0
(0x00007fde213c0000)
libgdk-x11-2.0.so.0 => /usr/lib/libgdk-x11-2.0.so.0
(0x00007fde2111e000)
libgdk_pixbuf-2.0.so.0 => /usr/lib/libgdk_pixbuf-2.0.so.0
(0x00007fde20f02000)
libpangocairo-1.0.so.0 => /usr/lib/libpangocairo-1.0.so.0
(0x00007fde20cf6000)
libcairo.so.2 => /usr/lib/libcairo.so.2 (0x00007fde20a73000)
libgthread-2.0.so.0 => /usr/lib/libgthread-2.0.so.0
(0x00007fde2086e000)
libpangoft2-1.0.so.0 => /usr/lib/libpangoft2-1.0.so.0
(0x00007fde20640000)
libpango-1.0.so.0 => /usr/lib/libpango-1.0.so.0
(0x00007fde203f7000)
libfontconfig.so.1 => /usr/lib/libfontconfig.so.1
(0x00007fde201c5000)
libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0x00007fde1ff3f000)
libdbus-glib-1.so.2 => /usr/lib/libdbus-glib-1.so.2
(0x00007fde1fd1d000)
libdbus-1.so.3 => /lib/libdbus-1.so.3 (0x00007fde1fae0000)
libgegl-0.0.so.0 => /usr/lib/libgegl-0.0.so.0 (0x00007fde1f891000)
libgio-2.0.so.0 => /usr/lib/libgio-2.0.so.0 (0x00007fde1f614000)
libbabl-0.0.so.0 => /usr/lib/libbabl-0.0.so.0 (0x00007fde1f3e4000)
libm.so.6 => /lib/libm.so.6 (0x00007fde1f15f000)
libgobject-2.0.so.0 => /usr/lib/libgobject-2.0.so.0
(0x00007fde1ef19000)
libglib-2.0.so.0 => /usr/lib/libglib-2.0.so.0 (0x00007fde1ec54000)
libpthread.so.0 => /lib/libpthread.so.0 (0x00007fde1ea38000)
libc.so.6 => /lib/libc.so.6 (0x00007fde1e6c6000)
libatk-1.0.so.0 => /usr/lib/libatk-1.0.so.0 (0x00007fde1e4a6000)
libgmodule-2.0.so.0 => /usr/lib/libgmodule-2.0.so.0
(0x00007fde1e2a2000)
librt.so.1 => /lib/librt.so.1 (0x00007fde1e09a000)
libXext.so.6 => /usr/lib/libXext.so.6 (0x00007fde1de88000)
libXrender.so.1 => /usr/lib/libXrender.so.1 (0x00007fde1dc7e000)
libXinerama.so.1 => /usr/lib/libXinerama.so.1 (0x00007fde1da7c000)
libXi.so.6 => /usr/lib/libXi.so.6 (0x00007fde1d871000)
libXrandr.so.2 => /usr/lib/libXrandr.so.2 (0x00007fde1d668000)
libXcursor.so.1 => /usr/lib/libXcursor.so.1 (0x00007fde1d45e000)
libX11.so.6 => /usr/lib/libX11.so.6 (0x00007fde1d157000)
libXcomposite.so.1 => /usr/lib/libXcomposite.so.1
(0x00007fde1cf54000)
libXdamage.so.1 => /usr/lib/libXdamage.so.1 (0x00007fde1cd52000)
libXfixes.so.3 => /usr/lib/libXfixes.so.3 (0x00007fde1cb4d000)
libz.so.1 => /lib/libz.so.1 (0x00007fde1c935000)
libpixman-1.so.0 => /usr/lib/libpixman-1.so.0 (0x00007fde1c6f0000)
libdirectfb-1.0.so.0 => /usr/lib/libdirectfb-1.0.so.0
(0x00007fde1c47c000)
libfusion-1.0.so.0 => /usr/lib/libfusion-1.0.so.0
(0x00007fde1c273000)
libdirect-1.0.so.0 => /usr/lib/libdirect-1.0.so.0
(0x00007fde1c05d000)
libpng12.so.0 => /usr/lib/libpng12.so.0 (0x00007fde1be36000)
libxcb-render-util.so.0 => /usr/lib/libxcb-render-util.so.0
(0x00007fde1bc32000)
libxcb-render.so.0 => /usr/lib/libxcb-render.so.0
(0x00007fde1ba29000)
libxcb.so.1 => /usr/lib/libxcb.so.1 (0x00007fde1b80d000)
libpcre.so.3 => /lib/libpcre.so.3 (0x00007fde1b5dd000)
libexpat.so.1 => /usr/lib/libexpat.so.1 (0x00007fde1b3b3000)
libdl.so.2 => /lib/libdl.so.2 (0x00007fde1b1af000)
libselinux.so.1 => /lib/libselinux.so.1 (0x00007fde1af93000)
/lib64/ld-linux-x86-64.so.2 (0x00007fde2292f000)
libXau.so.6 => /usr/lib/libXau.so.6 (0x00007fde1ad90000)
libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0x00007fde1ab8b000)
I'd normally run from a terminal at this stage but since X gets blown out I never get to see the output from the crash.
Is there anything obviously wrong with that output?
It was a bit embarrassing have shouted about how good GIMP was to see it disappear in a puff of smoke.
Any suggestions?
TIA, gg.
gimp taking out X on kubuntu 9.04
On Wednesday, October 27, 2010 16:09:20 gg@catking.net wrote:
Backtrace:
0: /usr/X11R6/bin/X(xorg_backtrace+0x26) [0x4f1b66] 1: /usr/X11R6/bin/X(xf86SigHandler+0x41) [0x485a61] 2: /lib/libc.so.6 [0x7f2039067040]
3: /usr/X11R6/bin/X(DeleteInputDeviceRequest+0x56) [0x496786] 4: /usr/X11R6/bin/X(CloseDownDevices+0x59) [0x447079] 5: /usr/X11R6/bin/X(main+0x40b) [0x433ddb] 6: /lib/libc.so.6(__libc_start_main+0xe6) [0x7f20390525a6] 7: /usr/X11R6/bin/X [0x433219]
Saw signal 11. Server aborting.
This trace tells me that the bug is in X or your VNC setup. Something is wrong in the way input is handed to X. If I were to try something it would be a different vnc server/client set. Gimp probably doesent even crash untill x is gone.
-- Alexia