You are here

Compiling under Linux


for compiling using linux (in my case archlinux x64) some lines of code must be changed:

file CPlugin.cpp

change to

file CPlugin.h

#define PLIK_OKNA "\\"
change to
#define PLIK_OKNA "/"

file CPluginImiona.cpp

change to

file CPluginGenerator.h

add include cstdlib (otherwise gcc complains about missing atoi in namespace)
#include <cstdlib>

then (since foldername is generated by pluginname) compile to CalendarGenerator.exe like on windows
names on linux are case sensitive, so folder name and plugin name must be written the same case

folder: CalendarCreator
plugin: CalendarCreator.exe

I used following to compile on my system (not all options may be need). It creates CalendarGenerator.exe in the source dir, which has to be copied to ~/.gimp-2.8/plug-ins along with the folder which contains the styles.

g++ -pthread -I/usr/include/gimp-2.0 -I/usr/include/gtk-2.0 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/cairo -I/usr/include/libpng15 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -o CalendarGenerator.exe main.cpp CPlugin.cpp CPluginGUI.cpp CPluginGenerator.cpp CPluginGUIUstawienia.cpp CPluginImiona.cpp -lgimpui-2.0 -lgimpwidgets-2.0 -lgimpmodule-2.0 -lgimp-2.0 -lgimpmath-2.0 -lgimpconfig-2.0 -lgimpcolor-2.0 -lgimpbase-2.0 -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lcairo -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 -lglib-2.0 -lm

I hope I could help someone.


Have you installed and loaded the Style-Files?

Folder ~/.gimp2.8/plug-ins/CalendarCreator/

in my case there are following files inside:

names_dots.txt STYL_clear STYL_orange STYL_test
names_gimpchat.txt STYL_clear_version2 STYL_pastel STYL_windows
names_horizontal.txt STYL_default STYL_table
names_vertical.txt STYL_gimpchat STYL_table_note STYL_medium STYL_table_small

At the moment the deprecated warnings could be ignored.

What happens if you change opacity to full?

My system is 64 bits, maybe 32 bits need some other fix ?!

The compiled

The compiled binary file (xubuntu 12.10 32bit),got a few of warnings.
"CPlugin.cpp: In static member function ‘static void CPlugin::query()’:
CPlugin.cpp:13:3: warning: deprecated conversion from string constant to ‘gchar* {aka char*}’ [-Wwrite-strings]
CPlugin.cpp:13:3: warning: deprecated conversion from string constant to ‘gchar* {aka char*}’ [-Wwrite-string"
However plugin does not works correctly.
-Not charging settings,all parameters are set to zero.
-Does not show preview.
-Generates only an empty transparent layer,progress bar
Gimp loaded from the command line,displays a warning:
(CalendarCreator.exe:2760): Gtk-WARNING **: GtkSpinButton: setting an adjustment with non-zero page size is deprecated
Any ideas? :(


Thanks, I looked in the wrong line ...

You must modify

You must modify the code in the CPlugin.h, no in CPluginGUI.h. The line #define PLIK_OKNA "\\"
does not exist in the file
Dude, please check the all it again.


fixed, it was in the text but handled as an html-tag :-(

What #include?

file CPluginGenerator.h
add include (otherwise gcc complains about missing atoi in namespace)
What #include?
Need to specify the #include "File_Name"

Subscribe to Comments for "Compiling under Linux"