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

salad jonk saladjonk at gmail.com
Fri Sep 9 21:27:43 PDT 2005


I am a beginner of X-window programming.When I compiled the source
file I meet a problem,just could not find the library on the
freebsd5.4

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:

/var/tmp//ccPzpiws.o(.text+0xc): In function `Initialise':
: undefined reference to `XOpenDisplay'
/var/tmp//ccPzpiws.o(.text+0xd2): In function `CreateWindow':
: undefined reference to `XCreateSimpleWindow'
/var/tmp//ccPzpiws.o(.text+0xe9): In function `CreateWindow':
: undefined reference to `XMapWindow'
/var/tmp//ccPzpiws.o(.text+0x1e5): In function `main':
: undefined reference to `XDrawLine'
/var/tmp//ccPzpiws.o(.text+0x20a): In function `main':
: undefined reference to `XDrawLine'
/var/tmp//ccPzpiws.o(.text+0x21d): In function `main':
: undefined reference to `XSync'
/var/tmp//ccPzpiws.o(.text+0x23e): In function `main':
: undefined reference to `XDestroyWindow'
/var/tmp//ccPzpiws.o(.text+0x252): In function `main':
: undefined reference to `XDestroyWindow'
/var/tmp//ccPzpiws.o(.text+0x263): In function `main':
: undefined reference to `XCloseDisplay'

What should I do?

-- 
I am young,so my heart is full of dream


More information about the freebsd-x11 mailing list