Compiling a GNOME panel applet requires some custom compiler flags. For your convenience, the gnome-config script can be used to automatically include the necessary flags.
$ gcc `gnome-config --cflags applets` -o my_applet.o -c my_applet.c
$ gcc `gnome-config --libs applets` -o my_applet my_applet.o
$ ./my_applet
|
Note: If you get an error message, check that libpanel_applet is installed correctly