Date: Mon, 12 Sep 2005 10:11:00 +0300 From: Nikolay Orlyuk <ony@pisem.net> To: saladjonk@gmail.com Cc: freebsd-x11@freebsd.org Subject: Re: Hi,I have a meet a problem,wish you to help me Message-ID: <43252A04.4010901@pisem.net> In-Reply-To: <ac3c93f405090921277ee8b5b0@mail.gmail.com> References: <ac3c93f405090921277ee8b5b0@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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@pisem.net icq: 136497739 aim: virkony msn: virkony@hotmail.com
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?43252A04.4010901>