gnome fallback panel applet creation problem

I'm trying to create a panel applet, but I'm stuck at the first step: I've created a file.cpp with the code from the official example at

#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)

compiled with

g++ -Wall -DGTK_DISABLE_SINGLE_INCLUDES -DGDK_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED -DGSEAL_ENABLE `pkg-config --cflags --libs gtk+-3.0 libpanelapplet-4.0` *.cpp -o helloworld

and copied under


then I've created the file


with this content:

[Applet Factory]
Name=Hello World Applet Factory
Description=Factory for the window navigation related applets

Name=Hello World
Description=Factory for the Hello World applet example

all the code is taken from the documentation, but when I try to add the applet to the panel I had this error:

** (gnome-panel:24803): WARNING **: Failed to load applet HelloWorldFactory::HelloWorldApplet: /usr/lib/gnome-panel/helloworld: cannot dynamically load executable

what's wrong??


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]