Hi there,
I'm trying to develop a Gnome Applet but I encountered some, problems.
I read the tutorial here: http://developer.gnome.org/panel-applet/3.0/getting-started.example.html
I've created the file helloworld.c:
But when I try to compile it, I got the error:
[CMD=">"]gcc -Wall `pkg-config --cflags --libs libpanelapplet-3.0` helloworld.c -o helloworld
helloworld.c:32:39: error: macro "PANEL_APPLET_OUT_PROCESS_FACTORY" requires 5 arguments, but only 4 given
helloworld.c:29: error: expected '=', ',', ';', 'asm' or '__attribute__' at end of input
[/CMD]
pkg-config give me this result:
[CMD=">"]pkg-config --cflags --libs libpanelapplet-3.0
-I/usr/local/include/gnome-panel-3.0/libpanel-applet -I/usr/local/include/gconf/2 -I/usr/local/include/orbit-2.0 -DORBIT2=1 -I/usr/local/include/gtk-2.0 -I/usr/local/include/gio-unix-2.0/ -I/usr/local/include/atk-1.0 -I/usr/local/include/cairo -I/usr/local/include/pixman-1 -D_THREAD_SAFE -I/usr/local/include/gdk-pixbuf-2.0 -I/usr/local/include/libpng15 -I/usr/local/include/pango-1.0 -D_REENTRANT -I/usr/local/include/glib-2.0 -I/usr/local/include/freetype2 -I/usr/local/include -lpanel-applet-3 -lgconf-2 -lgtk-x11-2.0 -lgdk-x11-2.0 -lpangocairo-1.0 -lXext -lXrender -lXinerama -lXi -lXrandr -lXcursor -lXcomposite -lXdamage -lXfixes -lX11 -latk-1.0 -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lpangoft2-1.0 -lpango-1.0 -lm -lgobject-2.0 -lgthread-2.0 -lgmodule-2.0 -pthread -lglib-2.0 -lfreetype -L/usr/local/lib -lfontconfig [/CMD]
Did I missed something ?
Thanks!
Flogo
I'm trying to develop a Gnome Applet but I encountered some, problems.
I read the tutorial here: http://developer.gnome.org/panel-applet/3.0/getting-started.example.html
I've created the file helloworld.c:
Code:
#include <gtk/gtk.h>
#include <panel-applet.h>
static gboolean
hello_world_applet_start (PanelApplet *applet)
{
GtkWidget *label;
label = gtk_label_new ("Hello World");
gtk_container_add (GTK_CONTAINER (applet), label);
gtk_widget_show_all (GTK_WIDGET (applet));
return TRUE;
}
static gboolean
hello_world_factory_callback (PanelApplet *applet,
const gchar *iid,
gpointer data)
{
gboolean retval = FALSE;
if (g_strcmp0 (iid, "HelloWorldApplet") == 0)
retval = hello_world_applet_start (applet);
return retval;
}
PANEL_APPLET_OUT_PROCESS_FACTORY ("HelloWorldFactory",
PANEL_TYPE_APPLET,
hello_world_factory_callback,
NULL)
But when I try to compile it, I got the error:
[CMD=">"]gcc -Wall `pkg-config --cflags --libs libpanelapplet-3.0` helloworld.c -o helloworld
helloworld.c:32:39: error: macro "PANEL_APPLET_OUT_PROCESS_FACTORY" requires 5 arguments, but only 4 given
helloworld.c:29: error: expected '=', ',', ';', 'asm' or '__attribute__' at end of input
[/CMD]
pkg-config give me this result:
[CMD=">"]pkg-config --cflags --libs libpanelapplet-3.0
-I/usr/local/include/gnome-panel-3.0/libpanel-applet -I/usr/local/include/gconf/2 -I/usr/local/include/orbit-2.0 -DORBIT2=1 -I/usr/local/include/gtk-2.0 -I/usr/local/include/gio-unix-2.0/ -I/usr/local/include/atk-1.0 -I/usr/local/include/cairo -I/usr/local/include/pixman-1 -D_THREAD_SAFE -I/usr/local/include/gdk-pixbuf-2.0 -I/usr/local/include/libpng15 -I/usr/local/include/pango-1.0 -D_REENTRANT -I/usr/local/include/glib-2.0 -I/usr/local/include/freetype2 -I/usr/local/include -lpanel-applet-3 -lgconf-2 -lgtk-x11-2.0 -lgdk-x11-2.0 -lpangocairo-1.0 -lXext -lXrender -lXinerama -lXi -lXrandr -lXcursor -lXcomposite -lXdamage -lXfixes -lX11 -latk-1.0 -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lpangoft2-1.0 -lpango-1.0 -lm -lgobject-2.0 -lgthread-2.0 -lgmodule-2.0 -pthread -lglib-2.0 -lfreetype -L/usr/local/lib -lfontconfig [/CMD]
Did I missed something ?
Thanks!
Flogo