From owner-freebsd-hackers@FreeBSD.ORG Mon Oct 26 21:04:48 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0E54C106566B for ; Mon, 26 Oct 2009 21:04:48 +0000 (UTC) (envelope-from f.loeber@googlemail.com) Received: from ey-out-2122.google.com (ey-out-2122.google.com [74.125.78.27]) by mx1.freebsd.org (Postfix) with ESMTP id 98D9B8FC14 for ; Mon, 26 Oct 2009 21:04:47 +0000 (UTC) Received: by ey-out-2122.google.com with SMTP id 9so2551325eyd.9 for ; Mon, 26 Oct 2009 14:04:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=IrHNFhIa56HaPyrVz2QsR+AXrghT/1u9DmWHvBpZ224=; b=sxhxP2YeenPXtYIzAw/O4DvyCOt4lZcRJMI+iyqLtwToQEBy8Qx8+LUpytgKjJoR6o ibTY7qokXebWqQ4t6AT3AfeMWqnHIN9+pNP7VsBMb8uVqyx32cFXVT0ys5UgW9wSm6IU dZgoLmCSRlBkwFyfzFiaboMkS0PmRy91x7lv4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=GrDf92mDlvz8WJ51alNPfhUf8b3EP6By/V25GkHpFvXboJxiPu3WEGkZA4W9ALS0BT 4hxJ3+7z06ymBe9L2q7sXaK3wdshf3Fmoeb9ZqozeqEmTh7nzObQ8NWOI7CzolMc8Hl1 A0GWDScdsXyWcfA9Y9K6fm8jFf1pExwxBOsWg= MIME-Version: 1.0 Received: by 10.216.93.2 with SMTP id k2mr1990905wef.210.1256589822570; Mon, 26 Oct 2009 13:43:42 -0700 (PDT) In-Reply-To: <6b4b2d2c0910261308i367569dbg887d7c713bf20ad1@mail.gmail.com> References: <6b4b2d2c0910261308i367569dbg887d7c713bf20ad1@mail.gmail.com> Date: Mon, 26 Oct 2009 21:43:42 +0100 Message-ID: From: Florian Loeber To: Oliver Mahmoudi Content-Type: text/plain; charset=UTF-8 Cc: freebsd-hackers@freebsd.org Subject: Re: writing a FreeBSD C library X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Oct 2009 21:04:48 -0000 Hi, you have to link your executable to your library. The command-line option is -l. % gcc -o testfile -lmylib source.c Without it, your program doesn't know that this library exists (somewhere, /usr/lib, ...) Regards, Florian