Hi.
I have installed knoppix 3.7. Why can't i compile the following code? Do i have to install something so that it compiles correctly?
Code:#include <stdio.h> #include <X11/Xlib.h> #include <X11/Xutil.h> int main() { Display *display; Window root, win; int screen; int x, y=100; unsigned int width=600, height=100; unsigned int bord=60; unsigned long bord_c=34; unsigned long back_c=232; char *display_name = NULL; if ( ( display=XOpenDisplay(display_name)) == NULL ) { fprintf( stderr,"connexion au Xserver %s impossible\n", XDisplayName(display_name)); exit(-1); } screen = DefaultScreen(display); root= RootWindow(display, screen); win = XCreateSimpleWindow(display, root, 50, 50, width, height, bord, bord_c, back_c); XMapWindow(display, win); while(1) { XEvent ev; XNextEvent(display, &ev); } }


Reply With Quote










