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

Re: idiot's question on Xlib programming



On Tue, 3 Aug 1999 huixf@tonghua.com.cn 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 reference to `XCloseDisplay'
> 
> What's the problem? Please reply to huixf@tonghua.com.cn because I will leave the list in a minute.
> 

You have to link with Xlib, try adding the '-lX11' flag to your compile
line.

You may find Gtk or some other high-level toolkit less frustrating; Xlib
is hard even if you have a lot of Unix programming experience.

Havoc



Reply to: