Hi,
I have a C++ project in Xcode 3.1.2 on OS X 10.5.8, to which I am
linking a static libpython3.1.a that I have compiled from the Python
source. I have it all working now, but along the path I encountered an
issue that I would like to ask about.
At first I did the following:
./configure --enable-universalsdk
make
I then added the resulting libpython3.1.a to the project, and tried to
build it. This resulted in the following error:
Undefined symbols:
"_environ", referenced from:
_environ$non_lazy_ptr in libpython3.1.a(posixmodule.o)
ld: symbol(s) not found
Upon investigation it seems that there are some issues with the POSIX
implementation in OS X regarding environ(7), and that a workaround is
to use *_NSGetEnviron(). This is handled in Modules/posixmodule.c, but
only when WITH_NEXT_FRAMEWORK is defined. However, it appears to me
that WITH_NEXT_FRAMEWORK is only defined/set when one ./configure with
--enable-framework.
My question is; Shouldn't this workaround of using *_NSGetEnviron()
also be used when building just the basic library without the
framework, as well as when building with the framework? To my
understanding, this is currently not possible, but should be.
Please CC me directly, since I am not subscribed to this list. Thanks!
Regards, Leo
_______________________________________________
Pythonmac-SIG maillist - Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig