undefined reference to `environ'
d:/linux/linuxkernel/WORKING_DIRECTORY/android-omap-20111108-gingerbread/libcore/luni/src/main/native/java_lang_ProcessManager.cpp:259: undefined reference to `environ'
`environ' is defined in d:\linux\linuxkernel\WORKING_DIRECTORY\android-omap-20111108-gingerbread\bionic\libc\bionic\libc_init_common.c:
char **environ;
but due to some reason, it's not working. I conduct a test for this. if I change environ to environ1, it's working, but not for environ. It's also different in the object file(.o) when I change the name of environ. So change the definition in java_lang_ProcessManager.cpp:
//extern char **environ;
char **environ;
http://msdn.microsoft.com/en-us/library/stxk41x1(v=VS.71).aspx
http://msdn.microsoft.com/zh-cn/vstudio/stxk41x1