Trying to compile a panel plugin

Jeroen van Aart jeroen at mompl.net
Thu May 30 20:22:32 CEST 2013


Hello (first post),

I am converting a gnome panel applet to xfce panel plugin. I have so far 
removed the few gnome specific parts in the source and replaced them 
with xfce specific source as appropriate.

I created makefile.am and configure.ac files using templates such as the 
weather plugin and the example plugin. However I am unsuccessful in 
getting it compiled properly. I am probably missing something obvious, 
but I double checked the examples with my own files and find no obvious 
problems.

I have attached the appropriate files as well as output of the errors in 
the hope someone has an idea. I don't think the problem is in the actual 
source, but I can add some of that later if necessary.


Errors while compiling:


make  all-recursive
make[1]: Entering directory `/source/my_example_xfce'
Making all in panel-plugin
make[2]: Entering directory `/source/my_example_xfce/panel-plugin'
gcc -DHAVE_CONFIG_H -I. -I.. -I.. 
-DTHEMESDIR=\"/usr/local/share/xfce4/my_example/icons\" 
-DPACKAGE_LOCALE_DIR=\"/usr/local/share/locale\" 
-DG_LOG_DOMAIN=\"my_example\" 
-DNDEBUG -pthread -I/usr/include/xfce4/libxfce4panel-1.0 
-I/usr/include/gtk-2.0 -I/usr/include/glib-2.0 
-I/usr/lib/x86_64-linux-gnu/glib-2.0/include 
-I/usr/lib/x86_64-linux-gnu/gtk-2.0/include -I/usr/include/atk-1.0 
-I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 
-I/usr/include/pango-1.0 -I/usr/include/gio-unix-2.0/ 
-I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 
-I/usr/include/xfce4   -pthread -I/usr/include/gtk-2.0 
-I/usr/lib/x86_64-linux-gnu/gtk-2.0/include -I/usr/include/gio-unix-2.0/ 
-I/usr/include/cairo -I/usr/include/pango-1.0 
-I/usr/include/gdk-pixbuf-2.0 -I/usr/include/glib-2.0 
-I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 
-I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/include/atk-1.0 
-I/usr/include/xfce4   -I/usr/include/glib-2.0 
-I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/xfce4 
-pthread -I/usr/include/gtk-2.0 
-I/usr/lib/x86_64-linux-gnu/gtk-2.0/include -I/usr/include/atk-1.0 
-I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 
-I/usr/include/pango-1.0 -I/usr/include/gio-unix-2.0/ 
-I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include 
-I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 
                                                        -g -O2 -MT 
xfce4_my_example_plugin-my_example.o -MD -MP -MF 
.deps/xfce4_my_example_plugin-my_example.Tpo -c -o 
xfce4_my_example_plugin-my_example.o `test -f 'my_example.c' || echo 
'./'`my_example.c
my_example.c:25:25: warning: ‘struct Example_Data’ declared inside 
parameter list [enabled by default]
my_example.c:25:25: warning: its scope is only this definition or 
declaration, which is probably not what you want [enabled by default]
my_example.c: In function ‘setdefaults’:
my_example.c:28:3: warning: incompatible implicit declaration of 
built-in function ‘strncpy’ [enabled by default]
my_example.c:28:21: error: dereferencing pointer to incomplete type
my_example.c:28:45: warning: incompatible implicit declaration of 
built-in function ‘strlen’ [enabled by default]
my_example.c:28:3: warning: passing argument 1 of ‘strlen’ makes pointer 
from integer without a cast [enabled by default]
my_example.c:28:3: note: expected ‘const char *’ but argument is of type 
‘int’
my_example.c:28:3: warning: passing argument 2 of ‘strncpy’ makes 
pointer from integer without a cast [enabled by default]
my_example.c:28:3: note: expected ‘const char *’ but argument is of type 
‘int’
my_example.c:30:21: error: dereferencing pointer to incomplete type
my_example.c:30:42: error: dereferencing pointer to incomplete type
my_example.c:30:67: error: dereferencing pointer to incomplete type
my_example.c:31:3: warning: incompatible implicit declaration of 
built-in function ‘strncat’ [enabled by default]
my_example.c:31:21: error: dereferencing pointer to incomplete type
my_example.c:31:32: error: ‘SIGFILE’ undeclared (first use in this function)

SIGFILE is one of the defines in my header files. Then it goes on as if 
it never read my header files with all the declarations.

Last bit:

my_example.c:248:17: error: unknown type name ‘XfcePanelPlugin’
my_example.c:248:42: error: unknown type name ‘GtkWidget’
my_example.c:248:60: error: unknown type name ‘GtkWidget’
make[2]: *** [xfce4_my_example_plugin-example.o] Error 1
make[2]: Leaving directory `/source/my_example_xfce/panel-plugin'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/source/my_example_xfce'
make: *** [all] Error 2

See attachment for Makefile.am, configure.ac and 
panel-plugin/Makefile.am. I generate the makefiles and configure files 
using xdt-autogen.


Thank you,
Jeroen

-- 
Earthquake Magnitude: 4.4
Date: Thursday, May 30, 2013 08:55:32 UTC
Location: Vanuatu
Latitude: -18.9247; Longitude: 169.4476
Depth: 258.40 km
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: xfce4-example_makefiles
URL: <http://mail.xfce.org/pipermail/xfce4-dev/attachments/20130530/bb6c7128/attachment.ksh>


More information about the Xfce4-dev mailing list