From owner-freebsd-questions@FreeBSD.ORG Mon Feb 4 19:53:25 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 77E3916A418 for ; Mon, 4 Feb 2008 19:53:25 +0000 (UTC) (envelope-from bhuvaneswari.ramkumar@gmail.com) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.170]) by mx1.freebsd.org (Postfix) with ESMTP id 077FE13C461 for ; Mon, 4 Feb 2008 19:53:23 +0000 (UTC) (envelope-from bhuvaneswari.ramkumar@gmail.com) Received: by ug-out-1314.google.com with SMTP id y2so86749uge.37 for ; Mon, 04 Feb 2008 11:53:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:references:x-google-sender-auth; bh=d7vkf1zrQuh42xOlIUZMPUJ3/JOsZfsZ+qr/y0fQ1y0=; b=E0GnLKmiQWznnifvufjF/dMO8oV2HNKji38/T3CVhLP+e8nRv1sWaLsJjJoc0d0MfCSiMJjAycJTujdHCr4hD/ZgwbbNa/P20pQTSeJyu94HAbUP9BlPX6KPnhYoegpMy8ipKrBAlTI4y4YOcpPDd01BPoagY8LZ61qCGxgGDLk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:references:x-google-sender-auth; b=pWkegRbnovhwRpG8SmVtxjjF1bTemC+SrUbKdm9WSanGi5P9uDaf7jWH1rg5jgIOLrsy4VFOlD5mroRS/scdnkg+SrPE8pbf6K86QPxEj7j4eiNNgWktut9B/ubNXVfFBXgn+0ZOvxDeE9BaNljMjVCEXG4sz4t5ZCT5gJjvH0w= Received: by 10.67.115.13 with SMTP id s13mr385077ugm.41.1202154802650; Mon, 04 Feb 2008 11:53:22 -0800 (PST) Received: by 10.86.58.7 with HTTP; Mon, 4 Feb 2008 11:53:22 -0800 (PST) Message-ID: <7c7927920802041153o65f6d0a9ofd376f5ed48ba900@mail.gmail.com> Date: Mon, 4 Feb 2008 14:53:22 -0500 From: "Bhuvaneswari Ramkumar" Sender: bhuvaneswari.ramkumar@gmail.com To: Mel In-Reply-To: <200802042041.57804.fbsd.questions@rachie.is-a-geek.net> MIME-Version: 1.0 References: <7c7927920802040954u948a5ebga929f11a2fa76a45@mail.gmail.com> <200802041929.32973.fbsd.questions@rachie.is-a-geek.net> <7c7927920802041036v79bc635h34c51f747384b0ad@mail.gmail.com> <200802042041.57804.fbsd.questions@rachie.is-a-geek.net> X-Google-Sender-Auth: b1e4f14b63077542 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-questions@freebsd.org 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:53:25 -0000 Question: Do I need to do this for every libnet app I compile, like modify the PROG variable in the app's folder .... even for the sample aplications already compiled & set ? Aside this, if someone could tell me the exact compilation steps for Libnet, it would be really helpful. Thanks Bhuvana On Feb 4, 2008 2:41 PM, Mel wrote: > 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 >