Re: idiot's question on Xlib programming

1999-08-04 Thread Martin Waller
You need to link in the Xlib library with the switch -lX11. Martin From: [EMAIL PROTECTED] To: debian-user@lists.debian.org Subject: idiot's question on Xlib programming I write a simple program but can't compile it. Below is the program: #include main() {Display *d=XOpenDisplay(N

Re: idiot's question on Xlib programming

1999-08-04 Thread Ludovic Paquet
[EMAIL PROTECTED] wrote: I write a simple program but can't compile it. Below is the program: #include main() {Display *d=XOpenDisplay(NULL);   if(d==NULL)    {printf("can't open display\n");exit(0);}  XCloseDisplay(d); } I use "gcc -I/usr/X11R6/include/X11 xhi.c" to complie it and get the follo

Re: idiot's question on Xlib programming

1999-08-04 Thread Havoc Pennington
On Tue, 3 Aug 1999 [EMAIL PROTECTED] wrote: > > I use "gcc -I/usr/X11R6/include/X11 xhi.c" to complie it and get the > following message: > > /tmp/cca002281.o: In function `main': > /tmp/cca002281.o(.text+0x9): undefined reference to `XOpenDisplay' > /tmp/cca002281.o(.text+0x45): undefined refe

idiot's question on Xlib programming

1999-08-04 Thread huixf
I write a simple program but can't compile it. Below is the program: #include main() {Display *d=XOpenDisplay(NULL); if(d==NULL) {printf("can't open display\n");exit(0);} XCloseDisplay(d); } I use "gcc -I/usr/X11R6/include/X11 xhi.c" to complie it and get the following message: /tmp/cca