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

Compiling with X [bit off topic]



I need to plot some graphs output from a C program, which I need to be
portable to a SGI unix machine.  Thus I am trying to use the xlib library.
I have xlib6g-dev installed.  My test program inludes the lines:
	#include <X11/Xlib.h>
And I compile with:
	gcc -I/usr/X11R6/include -L/usr/X11R6/lib myproc.c
but get errors like
	<reference>: undefined reference to 'XOpenDisplay'.
I checked in /usr/X11R6/include/X11/Xlib.h, and this contains a definition
of 
	extern Display *XOpenDisplay( . . . 
Could anyone please tell me what command-line options, and what includes I
need to use the Xlib libraries with my c-programs?
Thanks in advange
Rich 


Reply to: