Hi,I have a meet a problem,wish you to help me

Nikolay Orlyuk ony at pisem.net
Mon Sep 12 00:11:38 PDT 2005

salad jonk wrote:

>The name of the source file is "x_test.c"
>I use this command "gcc -o x_test x_test.c -I/usr/X11R6/include
>-L/usr/X11R6/lib",but can not pass the compile,just the following
>error message:
You didn't specified "-c" option to say that you want only compilation. 
At this case it try to link it also, but you didn't said "-lX11".

>/var/tmp//ccPzpiws.o(.text+0xc): In function `Initialise':
>: undefined reference to `XOpenDisplay'

>/var/tmp//ccPzpiws.o(.text+0x263): In function `main':
>: undefined reference to `XCloseDisplay'
this is most look for linking without some library.

>What should I do?
I think "gcc -lX11 -o x_test x_test.c -I/usr/X11R6/include -L/usr/X11R6/lib"

With best wishes Nikolay
e-mail: ony at pisem.net
icq: 136497739
aim: virkony
msn: virkony at hotmail.com

More information about the freebsd-x11 mailing list