Re: environ symbol undefined?
site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com 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 #include <crt_externs.h> #define environ (*_NSGetEnviron()) matt. _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... 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: This email sent to site_archiver@lists.apple.com
participants (1)
-
Matt Watson