From owner-freebsd-x11@FreeBSD.ORG Mon Sep 12 07:11:38 2005 Return-Path: X-Original-To: freebsd-x11@freebsd.org Delivered-To: freebsd-x11@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 06F5D16A41F for ; Mon, 12 Sep 2005 07:11:38 +0000 (GMT) (envelope-from ony@pisem.net) Received: from mail.innovativemarketing.com.ua (mail.innovativemarketing.com.ua [213.186.206.37]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7303443D45 for ; Mon, 12 Sep 2005 07:11:37 +0000 (GMT) (envelope-from ony@pisem.net) Received: from [10.9.7.100] (helo=[10.9.7.100]) by mail.innovativemarketing.com.ua with esmtpa (Exim 4.50 (FreeBSD)) id 1EEiTW-000Ex6-CW; Mon, 12 Sep 2005 10:11:34 +0300 Message-ID: <43252A04.4010901@pisem.net> Date: Mon, 12 Sep 2005 10:11:00 +0300 From: Nikolay Orlyuk User-Agent: Mozilla Thunderbird 1.0.2 (X11/20050513) X-Accept-Language: en-us, en MIME-Version: 1.0 To: saladjonk@gmail.com References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-x11@freebsd.org Subject: Re: Hi,I have a meet a problem,wish you to help me X-BeenThere: freebsd-x11@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: X11 on FreeBSD -- maintaining and support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Sep 2005 07:11:38 -0000 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