From Adrian Clark, "Recently I tried compiling version 3.x of OpenSceneGraph for Android, using a recent Android NDK, only to run into problems with missing dependencies when trying to link my android project against the generated libraries.



After some exploration, I found the problem is because the APP_PLATFORM variable in Application.mk is set to a platform number which is no longer compatible with the Android NDK by the OSG CMake toolchain. This causes the Android to compile it using the most recent Android platform libraries which (for reasons I don't know) no longer provide functions which OSG relies (in particular rand and stat64).



This bug affects the current SVN repos for OSG 3.3.1, OSG 3.3.0, OSG 3.2.1 and OSG 3.2.0 (and possibly earlier).



I posted a longer discussion of what the problem is in this forum thread:

http://forum.openscenegraph.org/viewtopic.php?p=62012#62012





But essentially the fix is to change one line in OSG/PlatformSpecifics/Android/Application.mk.master.in from:



APP_PLATFORM := ${ANDROID_PLATFORM}



To



APP_PLATFORM := android-${ANDROID_PLATFORM}





The attached file will fix the bug in the 3.2.0 - 3.3.1 SVN repos for OSG.

"


git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/branches/OpenSceneGraph-3.2@14612 16af8721-9629-0410-8352-f15c8da7e697