Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 19 Apr 2007 11:08:58 -0400
From:      Lowell Gilbert <freebsd-questions-local@be-well.ilk.org>
To:        "Desai\, Rajesh" <rajesh.desai@windriver.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: undefined reference to environ
Message-ID:  <44bqhkqu45.fsf@be-well.ilk.org>
In-Reply-To: <460801A4097E3D4CA04CC64EE6485848130E7C@ism-mail03.corp.ad.wrs.com> (Rajesh Desai's message of "Wed\, 18 Apr 2007 08\:25\:26 %2B0200")
References:  <460801A4097E3D4CA04CC64EE6485848130E7C@ism-mail03.corp.ad.wrs.com>

next in thread | previous in thread | raw e-mail | index | archive | help
"Desai, Rajesh" <rajesh.desai@windriver.com> writes:

> 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.

Those should be in the standard library also.
Can you come up with a simple test case that demonstrates the problem?
I can't reproduce anything like it on -STABLE.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?44bqhkqu45.fsf>