From b203faaa22ad35c71333b2c59068ac2dc1d3eced Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Thu, 18 Dec 2014 09:20:40 +0000 Subject: [PATCH] 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 --- PlatformSpecifics/Android/Application.mk.master.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PlatformSpecifics/Android/Application.mk.master.in b/PlatformSpecifics/Android/Application.mk.master.in index a21a8ee36..cdf782322 100644 --- a/PlatformSpecifics/Android/Application.mk.master.in +++ b/PlatformSpecifics/Android/Application.mk.master.in @@ -4,7 +4,7 @@ APP_PROJECT_PATH := $(call my-dir) APP_OPTIM := ${ANDROID_RELEASE_OPTIM} -APP_PLATFORM := ${ANDROID_PLATFORM} +APP_PLATFORM := android-${ANDROID_PLATFORM} APP_STL := ${ANDROID_STL} APP_CPPFLAGS := -fexceptions -frtti #APP_CPPFLAGS := -Os -mthumb-interwork -fno-short-enums