[SOLVED] Ogre Sample on Android

Discussion of issues specific to mobile platforms such as iOS, Android, Symbian and Meego.
lukry11
Gnoblar
Posts: 4
Joined: Wed May 20, 2015 7:20 pm
x 1

[SOLVED] Ogre Sample on Android

Post by lukry11 »

Hey

I downloaded and build a sample project from here on windows:
http://www.ogre3d.org/tikiwiki/Building ... With+CMake

Now I wanted to build this sample project on android:

I succesfuly build Ogre for Android as described here:
http://www.ogre3d.org/tikiwiki/tiki-ind ... on=Android

I wanted to know if it is possible/necessary to compile the sample project above with cmake and the ndk-build or if its enough to use only ndk-build.
If I need to use cmake in which way would the CMakeLists File look different?
Last edited by lukry11 on Sun May 24, 2015 2:44 pm, edited 2 times in total.
brainsandwich
Gnoblar
Posts: 11
Joined: Fri Mar 13, 2015 11:18 am
x 2

Re: Ogre Sample on Android

Post by brainsandwich »

Hi,

Not sure what you mean by "cmake+ndk-build or ndk-build", but to run your own project using Ogre for Android, the easiest is to use - I think - CMake to compile the Ogre project for Android, and then link the libraries with Android tools (ndk-build then).
If you want to use CMake to build your project too, you should take a look at Ogre Sample Browser's CMake - it works.

To answer you question to "how should my CMakeLists be different ?", I want to say "there will be weird parts but the main skeleton should remain".

I hope it leads you to something
lukry11
Gnoblar
Posts: 4
Joined: Wed May 20, 2015 7:20 pm
x 1

Re: Ogre Sample on Android

Post by lukry11 »

Hey,

I tried to build it with CMake.
But now if I type nmake after cmake generated the Makefile I'm getting undefined references:

They all look like __gnu_thumb1_case_*

EDIT:
Found out that i used the wrong version of android ndk.

Build it again with android-ndk-r8c and it worked!
brainsandwich
Gnoblar
Posts: 11
Joined: Fri Mar 13, 2015 11:18 am
x 2

Re: [SOLVED] Ogre Sample on Android

Post by brainsandwich »

You couldn't build with a more recent version ?
NDK r8c was published more than 2 years from now, and Google is making a new major version every year
User avatar
Wolfmanfx
OGRE Team Member
OGRE Team Member
Posts: 1525
Joined: Fri Feb 03, 2006 10:37 pm
Location: Austria - Leoben
x 99

Re: [SOLVED] Ogre Sample on Android

Post by Wolfmanfx »

you need to use the latest deps (from bitbucket) which works with the ndk10d.
lukry11
Gnoblar
Posts: 4
Joined: Wed May 20, 2015 7:20 pm
x 1

Re: [SOLVED] Ogre Sample on Android

Post by lukry11 »

brainsandwich wrote:You couldn't build with a more recent version ?
NDK r8c was published more than 2 years from now, and Google is making a new major version every year
I tried to build it before with an older version.