From owner-freebsd-questions@FreeBSD.ORG Mon Feb 4 19:42:00 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 28F0716A418 for ; Mon, 4 Feb 2008 19:42:00 +0000 (UTC) (envelope-from fbsd.questions@rachie.is-a-geek.net) Received: from snoogles.rachie.is-a-geek.net (rachie.is-a-geek.net [66.230.99.27]) by mx1.freebsd.org (Postfix) with ESMTP id EA61713C442 for ; Mon, 4 Feb 2008 19:41:59 +0000 (UTC) (envelope-from fbsd.questions@rachie.is-a-geek.net) Received: from localhost (localhost [127.0.0.1]) by snoogles.rachie.is-a-geek.net (Postfix) with ESMTP id EB3F01CD37; Mon, 4 Feb 2008 10:41:58 -0900 (AKST) From: Mel To: freebsd-questions@freebsd.org Date: Mon, 4 Feb 2008 20:41:57 +0100 User-Agent: KMail/1.9.7 References: <7c7927920802040954u948a5ebga929f11a2fa76a45@mail.gmail.com> <200802041929.32973.fbsd.questions@rachie.is-a-geek.net> <7c7927920802041036v79bc635h34c51f747384b0ad@mail.gmail.com> In-Reply-To: <7c7927920802041036v79bc635h34c51f747384b0ad@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200802042041.57804.fbsd.questions@rachie.is-a-geek.net> Cc: Bhuvaneswari Ramkumar Subject: Re: Libnet in FreeBSD X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Feb 2008 19:42:00 -0000 On Monday 04 February 2008 19:36:17 Bhuvaneswari Ramkumar wrote: > well actually, even the sample applications seem to have the same problem, > So I'm guessing its some installation issue: > > # cc dns.c > /var/tmp//ccImyVt1.o(.text+0x88) : In function 'main' : : undefined > reference to 'libnet_init' > > This is how my compilation result reads for the dns.c sample application. > Says the same for all libnet calls. Linking 101. If you used the port (/usr/ports/net/libnet) then: cc -L/usr/local/lib/libnet11 -lnet dns.c or: cat <BSDmakefile PROG=dns LDADD=-lnet LDFLAGS+=-L/usr/local/lib/libnet11 .include EOF then type make :) -- Mel