From owner-freebsd-questions Mon Nov 30 03:18:10 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id DAA15362 for freebsd-questions-outgoing; Mon, 30 Nov 1998 03:18:10 -0800 (PST) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from cask.force9.net (cask.force9.net [195.166.128.29]) by hub.freebsd.org (8.8.8/8.8.8) with SMTP id DAA15357 for ; Mon, 30 Nov 1998 03:18:08 -0800 (PST) (envelope-from banta@ghulam.force9.co.uk) Received: (qmail 5454 invoked from network); 30 Nov 1998 11:20:35 -0000 Received: from 54.usr01.shef.dialup.force9.net (HELO signup) (195.166.132.54) by cask.force9.net with SMTP; 30 Nov 1998 11:20:35 -0000 From: "Ghulam Dastgir" To: Cc: Subject: Re: XWindows programming Date: Mon, 30 Nov 1998 11:18:13 -0800 Message-ID: <01be1c96$2d07a360$3684a6c3@signup> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 4.71.1712.3 X-MimeOLE: Produced By Microsoft MimeOLE V4.71.1712.3 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hi Nate, thanks for replying. I've tried what you've said but I still get the same errors. I've confirmed that all the named directories exist. This porbably seems extreme but I'm thinking of re-installing XWindows on my FBSD2.2.6 (perhaps there's some bug somewhere !?!). Any thoughts. Thanks again. Ghulam p.s. I've included another sample short C program in question :- #include #include #include main() { Display *display; Window window; int screen; unsigned long foreground, background; display = XOpenDisplay (""); if (display == NULL) { fprintf(stderr, "cannot connect to server\n"); exit (EXIT_FAILURE); } screen = DefaultScreen(display); background = WhitePixel(display, screen); foreground = BlackPixel(display, screen); window = XCreateSimpleWindow(display, DefaultRootWindow(display), 100, 50, 350,250, 2, foreground, background); if (window == NULL) { fprintf(stderr,"cannot open window\n"); exit(EXIT_FAILURE); } XMapRaised(display, window); XFlush(display); sleep(5); XDestroyWindow(display, window); XCloseDisplay(display); exit (EXIT_SUCCESS); } -----Original Message----- From: nvp@mediaone.net To: Ghulam Dastgir Cc: freebsd-questions@FreeBSD.ORG Date: Sunday, November 29, 1998 11:56 AM Subject: Re: XWindows programming > >> I've just started X programming using Xlib and when I compile my C >> program, that includes the header file Xlib.h, I get errors for all >> the Xlib.h declared functions my C program calls, like: > >You should be using the (gcc) options -I/usr/X11R6/include and >-L/usr/X11R6/lib as well as -lX11 -lXt, so: > >prompt$ gcc -I/usr/X11R6/include -L/usr/X11R6/lib file.c -lX11 -lXt > >-- >Nate Patwardhan >nvp@mediaone.net > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message