Re: environ symbol undefined?
site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com On Fri, 25 Mar 2005 21:45:37 -0800 Matt Watson <mwatson@apple.com> wrote:
_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())
Yup. That fixes it. Maybe this should really be added to the .SYNOPSIS of the environ(7) man page? Thanks, Mike -- IRC - where men are men, women are men, and the boys are FBI agents. _______________________________________________ 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... This email sent to site_archiver@lists.apple.com
participants (1)
-
Michael B Allen