Anyone have any idea about how to use gdk to make a window?
This is what i have so far the code compiles but when i execute the compiled binary nothing happens i did a ps -A check and what ya know the app wasn't running.
Code:
#include <gdk/gdk.h>
int main( int argc,
char *argv[] )
{
GdkWindowAttr attr;
GdkWindow *win;
gdk_init(&argc,&argv);
attr.window_type = GDK_WINDOW_TOPLEVEL;
attr.wclass = GDK_INPUT_OUTPUT;
attr.event_mask = GDK_STRUCTURE_MASK;
win = gdk_window_new(NULL,&attr,0);
gdk_window_show(win);
return 0;
}
Here is how i am compiling the code
[code=]
gcc test.c -o test `pkg-config --cflags --libs gdk-2.0`
[/code]
There are no errors thrown.
Thanks.