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

Re: Compiling with X [bit off topic]



Thanks a lot, this is exactly what I wanted to know.  Cheers
Rich

On 26 Jan 1999, Gary L. Hennigan wrote:

> "Rich Harran." <95rmwh@eng.cam.ac.uk> writes:
> | 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?
> 
> More important to your problem is how you're linking. As a bare
> minimum I'm guessing you'll need "-L/usr/X11R6/lib -lX11" flags.
> 
> Gary
> 
> 
> -- 
> Unsubscribe?  mail -s unsubscribe debian-user-request@lists.debian.org < /dev/null
> 
> 


Reply to: