Ogre Build on Official Android NDK 2.3

Discussion of issues specific to mobile platforms such as iOS, Android, Symbian and Meego.
Post Reply
jsding
Greenskin
Posts: 105
Joined: Tue Dec 14, 2010 9:46 am
x 1
Contact:

Ogre Build on Official Android NDK 2.3

Post by jsding »

Any body build ogre on android NDK2.3 which support STL, Exception, RTTI etc?

I've got a stack following with:
APP_STL := stlport_shared
APP_CPPFLAGS := -fexceptions -frtti

Code: Select all

OgreAny.h: In member function 'const std::type_info& Ogre::Any::getType() const':
OgreAny.h:67: error: must #include <typeinfo> before using typeid
OgreAny.h: In member function 'virtual const std::type_info& Ogre::Any::holder<ValueType>::getType() const':
OgreAny.h:118: error: must #include <typeinfo> before using typeid
OgreAny.h: In member function 'ValueType Ogre::Any::operator()() const':
OgreAny.h:158: error: must #include <typeinfo> before using typeid
OgreAny.h:165: error: invalid use of incomplete type 'const struct std::type_info'
<built-in>:0: error: forward declaration of 'const struct std::type_info'
OgreAny.h:166: error: must #include <typeinfo> before using typeid
OgreAny.h: In member function 'virtual const std::type_info& Ogre::AnyNumeric::numholder<ValueType>::getType() const':
OgreAny.h:231: error: must #include <typeinfo> before using typeid
OgreAny.h: In function 'ValueType* Ogre::any_cast(Ogre::Any*)':
OgreAny.h:341: error: must #include <typeinfo> before using typeid
OgreAny.h: In function 'ValueType Ogre::any_cast(const Ogre::Any&)':
OgreAny.h:359: error: invalid use of incomplete type 'const struct std::type_info'
<built-in>:0: error: forward declaration of 'const struct std::type_info'
OgreAny.h:360: error: must #include <typeinfo> before using typeid

Please help me, Thanks!
jsding
Greenskin
Posts: 105
Joined: Tue Dec 14, 2010 9:46 am
x 1
Contact:

Re: Ogre Build on Official Android NDK 2.3

Post by jsding »

Finally, I removed the Exception, RTTI code from OGRE1.8, and build it on official Android NDK2.3 with stlport_static, and got a 9M so file.

It works on Android 1.6+ well, but the frame rate only

Code: Select all

avgFPS: 2.19079, lastFPS: 1.66251, bestFPS: 5.6338, worstFPS: 1.38217, triangleCount: 22, batchCount: 6
and many

Code: Select all

E/libEGL  (17707): called unimplemented OpenGL ES API
Any idea?
SRombauts
Kobold
Posts: 39
Joined: Mon Feb 28, 2011 6:58 pm
Location: Paris, France
x 2
Contact:

Re: Ogre Build on Official Android NDK 2.3

Post by SRombauts »

Perhaps some of this is because you are using the emulator?
http://www.srombauts.fr, comments from an Android developer
User avatar
Xplodwild
Goblin
Posts: 231
Joined: Thu Feb 12, 2009 3:49 pm
Location: France
x 13
Contact:

Re: Ogre Build on Official Android NDK 2.3

Post by Xplodwild »

Would you mind uploading the APK so I can test it on a few devices to see performance reports? :)
User avatar
Thoran
Halfling
Posts: 94
Joined: Mon Dec 01, 2008 2:04 pm
Location: Germany
x 1
Contact:

Re: Ogre Build on Official Android NDK 2.3

Post by Thoran »

@jsding:

It would be really nice if you could summarize your steps to build ogre with the NDK. That would help others (me included) alot to get it it also compiled.
Do you think there is a chance that you write a few lines on the process?

Thoran
pratty70
Gnome
Posts: 341
Joined: Thu May 13, 2004 4:52 pm
Location: Wales - UK

Re: Ogre Build on Official Android NDK 2.3

Post by pratty70 »

Thoran wrote:@jsding:

It would be really nice if you could summarize your steps to build ogre with the NDK. That would help others (me included) alot to get it it also compiled.
Do you think there is a chance that you write a few lines on the process?

Thoran
I agree. Would be nice. I'd like to target Android, but don't want to spend too much time fussing around trying to work it out when someone's already done it.
User avatar
Thoran
Halfling
Posts: 94
Joined: Mon Dec 01, 2008 2:04 pm
Location: Germany
x 1
Contact:

Re: Ogre Build on Official Android NDK 2.3

Post by Thoran »

Thoran wrote:@jsding:

It would be really nice if you could summarize your steps to build ogre with the NDK. That would help others (me included) alot to get it it also compiled.
Do you think there is a chance that you write a few lines on the process?

Thoran
Hi again,

no news from you. Did you decide yet, on whether you write the basic steps into a text file for others to comprehend?
Would be nice to hear from you.

Thoran
SRombauts
Kobold
Posts: 39
Joined: Mon Feb 28, 2011 6:58 pm
Location: Paris, France
x 2
Contact:

Re: Ogre Build on Official Android NDK 2.3

Post by SRombauts »

Hi,

I myself made the first steps toward building Ogre 3D for Android, and I published some of this early work on my blog during the last few weeks.

First, I describe how to generate a "standalone toolchain" (gcc cross compiler for Android) under Linux (harder under Cygwin). See:
http://www.srombauts.fr/2011/03/06/stan ... toolchain/

Then I describe how to use "CMake with this "standalone toolchain" to build a simple C++ application (sample form Google Project "cmake-android"). See:
http://www.srombauts.fr/2011/03/15/cmake-for-android/

Feel free to comment, I will update those articles, as well as others about Ogre3D, JNI and Android NativeActivity!

Cheers,
SRombauts
http://www.srombauts.fr, comments from an Android developer
User avatar
Thoran
Halfling
Posts: 94
Joined: Mon Dec 01, 2008 2:04 pm
Location: Germany
x 1
Contact:

Re: Ogre Build on Official Android NDK 2.3

Post by Thoran »

Thanks for this, it is a start. I will have alook into as soon as I have some spare time.

Thoran
Post Reply