On Mar 25, 2005, at 9:01 PM, Michael B Allen wrote:
I reference the symbol environ(7) but the linker is choking on it:
ld: for architecture ppc
ld: Undefined symbols:
___eprintf
_environ
libtool: internal link edit command failed
What doesn't libc export that symbol? What am I doing wrong?
Are you building a shared library? If so, that symbol gets filled in
at process startup time, so it is only defined in executables. You
need to do something like:
#include <crt_externs.h>
#define environ (*_NSGetEnviron())
matt.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/darwin-dev/email@hidden