RE: Linker can't find symbol _environ in Framework
RE: Linker can't find symbol _environ in Framework
- Subject: RE: Linker can't find symbol _environ in Framework
- From: "David Litwin" <email@hidden>
- Date: Tue, 2 May 2006 10:58:38 -0700
- Thread-topic: Linker can't find symbol _environ in Framework
I just had the same problem two days ago with a shared library that
wanted to inspect the environment.
The _environ symbol is found in crt0.o, which isn't linked for anything
but my final executable. I had to rig a system by which the app would
provide it to the shared lib (awkward for me, as the shared lib is
loaded with dlopen and so had to dlsym back to the app for the routine
to provide it).
David Litwin
BigFix, Inc.
-----Original Message-----
From: xcode-users-bounces+david_litwin=email@hidden
[mailto:xcode-users-bounces+david_litwin=email@hidden] On
Behalf Of Jerry Krinock
Sent: Tuesday, May 02, 2006 10:30 AM
To: XCode Users
Subject: Linker can't find symbol _environ in Framework
Hi,
I have created a Cocoa framework project using files factored out of a
working Cocoa application. The files I have factored out includes
Apple's
famous "MoreAuthSample" code, which includes Apple's famous MoreCFQ.c,
MoreUNIX.c and MoreSecurity.c.
MoreSecurity.c declares:
extern char **environ ;
which would seem to be the cause of this linker error:
Undefined symbols:
_environ
>From searching developer.apple.com I see that "environ" is apparently
some
variable at the Mach-O level.
I have added the frameworks "Carbon.framework" and "Security.framework"
to
this framework project.
How/can this be made to link? I've fixed all the compiler errors. This
one
linker error is my one remaining show-stopper.
Thank you,
Jerry Krinock
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
.com
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden