From owner-freebsd-questions@FreeBSD.ORG Wed Apr 18 07:03:28 2007 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 52EDC16A403 for ; Wed, 18 Apr 2007 07:03:28 +0000 (UTC) (envelope-from rajesh.desai@windriver.com) Received: from mail.wrs.com (mail.windriver.com [147.11.1.11]) by mx1.freebsd.org (Postfix) with ESMTP id 22B2013C455 for ; Wed, 18 Apr 2007 07:03:27 +0000 (UTC) (envelope-from rajesh.desai@windriver.com) Received: from ALA-MAIL03.corp.ad.wrs.com (ala-mail03 [147.11.57.144]) by mail.wrs.com (8.13.6/8.13.6) with ESMTP id l3I6PSdt029679 for ; Tue, 17 Apr 2007 23:25:28 -0700 (PDT) Received: from ism-mail03.corp.ad.wrs.com ([128.224.200.20]) by ALA-MAIL03.corp.ad.wrs.com with Microsoft SMTPSVC(6.0.3790.1830); Tue, 17 Apr 2007 23:25:28 -0700 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Date: Wed, 18 Apr 2007 08:25:26 +0200 Message-ID: <460801A4097E3D4CA04CC64EE6485848130E7C@ism-mail03.corp.ad.wrs.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: undefined reference to environ Thread-Index: AceBglo0sfrF5Kn9T2+xzBNuFT2J4g== From: "Desai, Rajesh" To: X-OriginalArrivalTime: 18 Apr 2007 06:25:28.0245 (UTC) FILETIME=[5B655E50:01C78182] Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: undefined reference to environ 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: Wed, 18 Apr 2007 07:03:28 -0000 Hi, when i link my application witj -lc (libc). i get the following errors /usr/lib/libc.a(getenv.o): In function `getenv': getenv.o(.text+0x19): undefined reference to `environ' getenv.o(.text+0x29): undefined reference to `environ' getenv.o(.text+0x63): undefined reference to `environ' /usr/lib/libc.a(getenv.o): In function `__findenv': getenv.o(.text+0xd5): undefined reference to `environ' getenv.o(.text+0xe2): undefined reference to `environ' /usr/lib/libc.a(getenv.o)(.text+0x113): more undefined references to = `environ' follow /usr/lib/libc.a(getprogname.o): In function `_getprogname': getprogname.o(.text+0x4): undefined reference to `__progname' can any body help me what can be wrong..and where i cam dinf thease = symbols.