Skip site navigation (1)Skip section navigation (2)
Date:      27 May 2002 19:57:13 -0500
From:      Larry Rosenman <ler@lerctr.org>
To:        bishoju <bishoju@auburn.edu>
Cc:        questions@FreeBSD.ORG
Subject:   Re: compiling and linking
Message-ID:  <1022547435.1578.19.camel@lerlaptop>
In-Reply-To: <3CF2D8C1@webmail.duc.auburn.edu>
References:  <3CF2D8C1@webmail.duc.auburn.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 2002-05-27 at 19:39, bishoju wrote:
> While I was having trouble with Xinerama I wrote this little program. I 
> believe it is correct but do not know how to compile it on FreeBSD.
> 
> If someone can tell me I would appreciate it.
cc -O -I/usr/X11R6/include -o xineramatest  xineramatest.c
-L/usr/X11R6/lib -lXinerama -lXt -lXext 
> 
> Jud
> /* xineramatest.c
>  * By Jud Bishop
>  *
>  * to compile:
>  * gcc -o xintest -I- -I/usr/X11R6/include/ -L/usr/X11R6/lib -lXt -lXinerama 
> xineramatest.c
>  */
> #include <stdio.h>
> #include <stdlib.h>
> #include <X11/Xlib.h>
> #include <X11/extensions/Xinerama.h>
> 
> int main(int argc, char *argv[])
> {
> 	Bool xin;
> 	Display *display;
> 	char *which_display = NULL;
> 
> 	if ( !(display = XOpenDisplay(which_display) ) ){
> 		printf( "Didn't find X server. \n");
>     	        exit( -1 );
>         }
> 
> 	xin = ( XineramaIsActive(display) );
> 
> 	if(xin)
> 		printf("xinerama IS active \n");
> 	else
> 		printf("xinerama NOT active \n");
> 
> 	exit(0);	
> }
> 
> 
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-questions" in the body of the message
> 
-- 
Larry Rosenman                     http://www.lerctr.org/~ler
Phone: +1 972-414-9812                 E-Mail: ler@lerctr.org
US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1022547435.1578.19.camel>