Hi i write a program that write a message in gnome as notification bar
i can compile it in Terminal with command
gcc `pkg-config --cflags gtk+-2.0` `pkg-config --cflags glib-2.0` -lnotify main.c -o hi
but in code block i got error because i don't know how set this option in code::block can you help me
i set this options in build option window at other option tab but it doesn't work!
and in below u can see my code
#include <libnotify/notify.h>
#include <stdio.h>
#include <unistd.h>
int main(int argc, char * argv[] )
{
NotifyNotification *n;
notify_init("Basics");
n = notify_notification_new ("Summary",
"This is the message that we want to display",
NULL, NULL);
notify_notification_set_timeout (n, 5000); // 5 seconds
if (!notify_notification_show (n, NULL))
{
fprintf(stderr, "failed to send notification\n");
return 1;
}
g_object_unref(G_OBJECT(n));
return 0;
}
-------------------------------------------------------------------------------------------
Solution:Go to Project -> Build options In linker setting add notify