problems having compiling programs

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

 



hi..

i am a newbie who is currently reading a book on
Xwindow applications programming .So there is little
program to connect to an Xserver.
it goes as

#include<stdio.h>
#include<X11/Xlib.h>
main()
{
        Display *display=NULL;
        display=XOpenDisplay((char *)NULL);
        if(display==NULL)
         {
            printf("no connection made..\n");
          }
           else
            printf("connection made.\n");
 }

but when i try to compile this using

gcc -o X.o X.c -lX11 i get the error


-lX11 not found ....

how should i compile this program to run this code??

i am using Redhat 9

thanks

haynes


________________________________________________________________________
Yahoo! India Insurance Special: Be informed on the best policies, services, tools and more. 
Go to: http://in.insurance.yahoo.com/licspecial/index.html
_______________________________________________
XFree86 mailing list
XFree86@xxxxxxxxxxx
http://XFree86.Org/mailman/listinfo/xfree86

[Index of Archives]     [X Forum]     [Xorg]     [XFree86 Newbie]     [IETF Announce]     [Security]     [Font Config]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux Kernel]

  Powered by Linux