This is the mail archive of the
cygwin-xfree@cygwin.com
mailing list for the Cygwin XFree86 project.
Re: can't open XDisplay
- From: "PD Dr. Edward Wornar" <edi at serbski-institut dot de>
- To: arun2202 at hotmail dot com
- Cc: cygwin-xfree at cygwin dot com
- Date: Thu, 02 May 2002 10:49:58 +0200 (CEST)
- Subject: Re: can't open XDisplay
- References: <OE271Kx9DBFoxhYaf7i00004ced@hotmail.com>
Hi,
are you trying to run the program from the cygwin shell, or from
an xterm within xfree86 (as you should)?
Cheers
Edi
>
> I am compiling a linux XWindows application in win98 using cygwin/xfree86.
> But when I execute the program, opening XDisplay fails, due to the following
> code fragment
>
> dpy = XOpenDisplay(getenv("DISPLAY"));
> if (dpy == 0)
> {
> fprintf(stderr,"Can't open X display\n");
> exit(1);
> }
>
>
> what could be the problem???