Android build quick start guide

Discussion of issues specific to mobile platforms such as iOS, Android, Symbian and Meego.
Emerich
Halfling
Posts: 64
Joined: Wed Oct 24, 2012 10:59 am

Re: Android build quick start guide

Post by Emerich » Thu Aug 08, 2013 11:37 pm

mzoltan25 wrote:it seems rather cumbersome for me, and the ant doesnt work out and sheet like this.

I want something clean like an eclipse (ide or what) project files and then opening this clicking build button.. etc etc. and then it works. Is there such a thing?
As most of this thread points out, not quite.

I posted a project however that might work. You need Visual studio and the NSight Tegra Visual Studio Edition package however.

All this CMAKE stuff you see in this thread is about compiling the whole jazz.
0 x

User avatar
luis
Greenskin
Posts: 108
Joined: Tue Mar 02, 2004 3:33 pm
Location: Spain / Argentina
Contact:

Re: Android build quick start guide

Post by luis » Tue Aug 20, 2013 5:25 pm

Wolfmanfx wrote:I created OGRE JNI in mind but i see a lot people getting stuck there too :? What i see that people except a more complete example like an mesh viewer or something like that.

But maybe you guys can give me some hints how do you except that to work maybe you have already experience with other engines and the have better workflows - i am ready to adapt ;)
As you know for me everything is straight forward so i am factory blind.
Hi,
In my case I'm trying to port an existing game to Android and after compiling and installing samplebrowser and OgreJNI, OgreJNI seems perfect to start as an application template to either make tests or to add your own existing code, the only thing missing is the input/event handling and assets loading. But for that there is the SampleBrowser so reading and understanding both examples is the best.
In android the most confusing thing to me was the directory structure and special classes used in Android (both, java and C++), so the simpler the code, the better to start porting/coding. Although SampleBrowser has some nice conditional compilation that a "real" portable application should have, so both examples are ok to me. But a simple demo with mesh loading, input handling and its own entry point for android/win/mac etc would do the job also.
The only think that makes me crazy are cmake scripts, Ogre cmake files are real monsters and hard to understand. I see myself editing .mk files....
0 x

arf_rinux
Gnoblar
Posts: 5
Joined: Sat Sep 21, 2013 2:45 pm

Re: Android build quick start guide

Post by arf_rinux » Mon Sep 23, 2013 1:47 pm

Hi,
I've created a simple test application in Android using the native_app_glue approach and Ogre 1.9 brach. Everything looks fine but the only thing I see is the red backgroud of the viewport. I posted here the code and the log of the app: http://www.ogre3d.org/forums/viewtopic.php?f=21&t=76491
In the log all looks fine but no mesh is rendered and no 2D background with texture.
Can somebody give me some hints?

Thanks.
0 x

RigoCL
Greenskin
Posts: 114
Joined: Mon Oct 14, 2013 1:41 am
Location: Chile

Re: Android build quick start guide

Post by RigoCL » Thu Oct 24, 2013 4:52 am

Hi guys!
Need some help here...

At the moment I read Hebdemnobad's Android Quick Start Guide (http://www.ogre3d.org/forums/viewtopic. ... 00#p493684) I supposed something was not going to work well at the final step, because I thought how the hell ant is going to know how exactly install the APK, and I wasn't wrong... my problem is at the very end of the whole process, I have successfully built "NativeActivity-debug.apk" at the .\SampleBrowserNDK\bin directory (Windows 7), but when running the last command 'ant debug install' after few seconds it gets stuck at the msg:

install:
[echo] Installing F:\Ogre_1_9\ogre\android_build\SampleBrowserNDK\bin\NativeActivity-debug.apk onto default emulator or device...

and nothing else happens, I connected my Samsung SIII and at the explorer it shows as 'GT-I9300' with two dirs 'Card' and 'Phone', but I don't know what to do next in order to finally get the APK file and all the resources (models, materials, thumbnails, etc) installed.

I'm pretty sure this is a silly question, but I really don't know what to do next.

Any help will be appreciated.

R.-
0 x

Emerich
Halfling
Posts: 64
Joined: Wed Oct 24, 2012 10:59 am

Re: Android build quick start guide

Post by Emerich » Thu Oct 24, 2013 8:50 am

Sounds like your device isn't in the USB debugging mode. You can find that in the Developer settings (just google your ROM and usb debugging and you should find it. Usually you have to go to settings => about phone => press your rom a dozen times => go to developer settings => android debugging//usb debugging

Tell me if that helped?
0 x

User avatar
c6burns
Beholder
Posts: 1511
Joined: Fri Feb 22, 2013 4:44 am
Location: Deep behind enemy lines

Re: Android build quick start guide

Post by c6burns » Thu Oct 24, 2013 11:39 am

0 x

RigoCL
Greenskin
Posts: 114
Joined: Mon Oct 14, 2013 1:41 am
Location: Chile

Re: Android build quick start guide

Post by RigoCL » Fri Oct 25, 2013 3:20 am

OMG!

I must say that I have never ever heard of anything like setting the Android device in USB debugging mode, sometimes is so damn hard to find a 100% complete tutorial.

Thanks Emerich and c6burns, problem solved with your help!
0 x

Emerich
Halfling
Posts: 64
Joined: Wed Oct 24, 2012 10:59 am

Re: Android build quick start guide

Post by Emerich » Fri Oct 25, 2013 8:56 am

Welcome mate. We all have to start some time. Glad it worked.
0 x

User avatar
affentanz
Kobold
Posts: 30
Joined: Tue Sep 03, 2013 10:34 pm

Re: Android build quick start guide

Post by affentanz » Fri Mar 14, 2014 7:17 pm

I have trouble with compiling ogre for android. I've installed everything (I hope so), put the android dependencies in the ogre source dir and set the env variables. When I do

Code: Select all

cmake -DCMAKE_TOOLCHAIN_FILE="../ogre/CMake/toolchain/android.toolchain.cmake" -DOGRE_DEPENDENCIES_DIR="../ogre/AndroidDependencies" -DANDROID_NATIVE_API_LEVEL=9 ../ogre
then I get this error:

Code: Select all

CMake Error at CMake/toolchain/android.toolchain.cmake:493 (message):
  Could not any working toolchain in the NDK.  Probably your Android NDK is
  broken.
I'm on ubuntu 13.10 and I'm sure to be on the 1-9 branch. Compiling for desktop works. Has anyone any idea?
0 x

User avatar
c6burns
Beholder
Posts: 1511
Joined: Fri Feb 22, 2013 4:44 am
Location: Deep behind enemy lines

Re: Android build quick start guide

Post by c6burns » Fri Mar 14, 2014 7:45 pm

Which NDK version? You have the proper env vars pointing to it? Those are required for CMake to work.
0 x

User avatar
affentanz
Kobold
Posts: 30
Joined: Tue Sep 03, 2013 10:34 pm

Re: Android build quick start guide

Post by affentanz » Sat Mar 15, 2014 1:08 pm

I found the error! You have to choose the x86 NDK version, even if you're on a 64 bit system. Now compilation works. Also the compilation of the SampleBrowserNDK works, but when I try to bring it on the device (ant debug install) it's just black. Everything seems to be ok:

Code: Select all

install:
     [echo] Installing /home/***/ogre/android/SampleBrowserNDK/bin/NativeActivity-debug.apk onto default emulator or device...
     [exec] 9688 KB/s (57017254 bytes in 5.746s)
     [exec] 	pkg: /data/local/tmp/NativeActivity-debug.apk
     [exec] Success

BUILD SUCCESSFUL
Total time: 47 seconds
Edit: Then I tried the sample browser from the play store. And it's the same: I just have a black screen after starting the app. I have a samsung galaxy note 8.0 tablet. Isn't it supported? How can I find out?
0 x

User avatar
affentanz
Kobold
Posts: 30
Joined: Tue Sep 03, 2013 10:34 pm

Re: Android build quick start guide

Post by affentanz » Sun Mar 16, 2014 1:14 pm

Ok, I don't know what was the problem, but today it works :) Maybe yesterday the battery of the device wasn't full enough...
0 x

User avatar
Mind Calamity
Ogre Magi
Posts: 1255
Joined: Sat Dec 25, 2010 2:55 pm
Location: Macedonia

Re: Android build quick start guide

Post by Mind Calamity » Sat Mar 29, 2014 11:28 am

Hey guys, I'm facing the following issues when building:

Code: Select all

, Ogre::SharedPtr<Ogre::Codec::CodecData>&) const:src/OgreFreeImageCodec.cpp:324
: error: undefined reference to 'FreeImage_AllocateT'
D:/Android/NDK/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/
gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: D:/P
rojects/ogre-new/Repo/lib/libOgreMainStatic.a(OgreFreeImageCodec.cpp.o): in func
tion Ogre::FreeImageCodec::encodeBitmap(Ogre::SharedPtr<Ogre::MemoryDataStream>&
, Ogre::SharedPtr<Ogre::Codec::CodecData>&) const:src/OgreFreeImageCodec.cpp:346
: error: undefined reference to 'FreeImage_GetPitch'
D:/Android/NDK/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/
gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: D:/P
rojects/ogre-new/Repo/lib/libOgreMainStatic.a(OgreFreeImageCodec.cpp.o): in func
tion Ogre::FreeImageCodec::encodeBitmap(Ogre::SharedPtr<Ogre::MemoryDataStream>&
, Ogre::SharedPtr<Ogre::Codec::CodecData>&) const:src/OgreFreeImageCodec.cpp:351
: error: undefined reference to 'FreeImage_GetBits'
D:/Android/NDK/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/
gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: D:/P
rojects/ogre-new/Repo/lib/libOgreMainStatic.a(OgreFreeImageCodec.cpp.o): in func
tion Ogre::FreeImageCodec::encodeBitmap(Ogre::SharedPtr<Ogre::MemoryDataStream>&
, Ogre::SharedPtr<Ogre::Codec::CodecData>&) const:src/OgreFreeImageCodec.cpp:341
: error: undefined reference to 'FreeImage_ConvertToGreyscale'
D:/Android/NDK/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/
gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: D:/P
rojects/ogre-new/Repo/lib/libOgreMainStatic.a(OgreFreeImageCodec.cpp.o): in func
tion Ogre::FreeImageCodec::encodeBitmap(Ogre::SharedPtr<Ogre::MemoryDataStream>&
, Ogre::SharedPtr<Ogre::Codec::CodecData>&) const:src/OgreFreeImageCodec.cpp:342
: error: undefined reference to 'FreeImage_Unload'
D:/Android/NDK/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/
gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: D:/P
rojects/ogre-new/Repo/lib/libOgreMainStatic.a(OgreFreeImageCodec.cpp.o): in func
tion Ogre::FreeImageCodec::encodeBitmap(Ogre::SharedPtr<Ogre::MemoryDataStream>&
, Ogre::SharedPtr<Ogre::Codec::CodecData>&) const:src/OgreFreeImageCodec.cpp:264
: error: undefined reference to 'FreeImage_FIFSupportsExportBPP'
D:/Android/NDK/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/
gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: D:/P
rojects/ogre-new/Repo/lib/libOgreMainStatic.a(OgreFreeImageCodec.cpp.o): in func
tion Ogre::FreeImageCodec::encodeBitmap(Ogre::SharedPtr<Ogre::MemoryDataStream>&
, Ogre::SharedPtr<Ogre::Codec::CodecData>&) const:src/OgreFreeImageCodec.cpp:290
: error: undefined reference to 'FreeImage_FIFSupportsExportBPP'
D:/Android/NDK/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/
gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: D:/P
rojects/ogre-new/Repo/lib/libOgreMainStatic.a(OgreFreeImageCodec.cpp.o): in func
tion Ogre::FreeImageCodec::encodeBitmap(Ogre::SharedPtr<Ogre::MemoryDataStream>&
, Ogre::SharedPtr<Ogre::Codec::CodecData>&) const:src/OgreFreeImageCodec.cpp:300
: error: undefined reference to 'FreeImage_FIFSupportsExportBPP'
D:/Android/NDK/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/
gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: D:/P
rojects/ogre-new/Repo/lib/libOgreMainStatic.a(OgreFreeImageCodec.cpp.o): in func
tion Ogre::FreeImageCodec::encode(Ogre::SharedPtr<Ogre::MemoryDataStream>&, Ogre
::SharedPtr<Ogre::Codec::CodecData>&) const:src/OgreFreeImageCodec.cpp:373: erro
r: undefined reference to 'FreeImage_OpenMemory'
D:/Android/NDK/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/
gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: D:/P
rojects/ogre-new/Repo/lib/libOgreMainStatic.a(OgreFreeImageCodec.cpp.o): in func
tion Ogre::FreeImageCodec::encode(Ogre::SharedPtr<Ogre::MemoryDataStream>&, Ogre
::SharedPtr<Ogre::Codec::CodecData>&) const:src/OgreFreeImageCodec.cpp:375: erro
r: undefined reference to 'FreeImage_SaveToMemory'
D:/Android/NDK/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/
gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: D:/P
rojects/ogre-new/Repo/lib/libOgreMainStatic.a(OgreFreeImageCodec.cpp.o): in func
tion Ogre::FreeImageCodec::encode(Ogre::SharedPtr<Ogre::MemoryDataStream>&, Ogre
::SharedPtr<Ogre::Codec::CodecData>&) const:src/OgreFreeImageCodec.cpp:379: erro
r: undefined reference to 'FreeImage_AcquireMemory'
D:/Android/NDK/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/
gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: D:/P
rojects/ogre-new/Repo/lib/libOgreMainStatic.a(OgreFreeImageCodec.cpp.o): in func
tion Ogre::FreeImageCodec::encode(Ogre::SharedPtr<Ogre::MemoryDataStream>&, Ogre
::SharedPtr<Ogre::Codec::CodecData>&) const:src/OgreFreeImageCodec.cpp:387: erro
r: undefined reference to 'FreeImage_CloseMemory'
D:/Android/NDK/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/
gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: D:/P
rojects/ogre-new/Repo/lib/libOgreMainStatic.a(OgreFreeImageCodec.cpp.o): in func
tion Ogre::FreeImageCodec::encode(Ogre::SharedPtr<Ogre::MemoryDataStream>&, Ogre
::SharedPtr<Ogre::Codec::CodecData>&) const:src/OgreFreeImageCodec.cpp:389: erro
r: undefined reference to 'FreeImage_Unload'
D:/Android/NDK/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/
gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: D:/P
rojects/ogre-new/Repo/lib/libOgreMainStatic.a(OgreFreeImageCodec.cpp.o): in func
tion Ogre::FreeImageCodec::encodeToFile(Ogre::SharedPtr<Ogre::MemoryDataStream>&
, std::string const&, Ogre::SharedPtr<Ogre::Codec::CodecData>&) const:src/OgreFr
eeImageCodec.cpp:401: error: undefined reference to 'FreeImage_Save'
D:/Android/NDK/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/
gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: D:/P
rojects/ogre-new/Repo/lib/libOgreMainStatic.a(OgreFreeImageCodec.cpp.o): in func
tion Ogre::FreeImageCodec::encodeToFile(Ogre::SharedPtr<Ogre::MemoryDataStream>&
, std::string const&, Ogre::SharedPtr<Ogre::Codec::CodecData>&) const:src/OgreFr
eeImageCodec.cpp:402: error: undefined reference to 'FreeImage_Unload'
D:/Android/NDK/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/
gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: D:/P
rojects/ogre-new/Repo/lib/libOgreMainStatic.a(OgreFreeImageCodec.cpp.o): in func
tion Ogre::FreeImageCodec::startup():src/OgreFreeImageCodec.cpp:85: error: undef
ined reference to 'FreeImage_Initialise'
D:/Android/NDK/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/
gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: D:/P
rojects/ogre-new/Repo/lib/libOgreMainStatic.a(OgreFreeImageCodec.cpp.o): in func
tion Ogre::FreeImageCodec::startup():src/OgreFreeImageCodec.cpp:89: error: undef
ined reference to 'FreeImage_GetVersion'
D:/Android/NDK/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/
gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: D:/P
rojects/ogre-new/Repo/lib/libOgreMainStatic.a(OgreFreeImageCodec.cpp.o): in func
tion Ogre::FreeImageCodec::startup():src/OgreFreeImageCodec.cpp:92: error: undef
ined reference to 'FreeImage_GetCopyrightMessage'
D:/Android/NDK/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/
gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: D:/P
rojects/ogre-new/Repo/lib/libOgreMainStatic.a(OgreFreeImageCodec.cpp.o): in func
tion Ogre::FreeImageCodec::startup():src/OgreFreeImageCodec.cpp:98: error: undef
ined reference to 'FreeImage_GetFIFCount'
D:/Android/NDK/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/
gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: D:/P
rojects/ogre-new/Repo/lib/libOgreMainStatic.a(OgreFreeImageCodec.cpp.o): in func
tion Ogre::FreeImageCodec::startup():src/OgreFreeImageCodec.cpp:106: error: unde
fined reference to 'FreeImage_GetFIFExtensionList'
D:/Android/NDK/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/
gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: D:/P
rojects/ogre-new/Repo/lib/libOgreMainStatic.a(OgreFreeImageCodec.cpp.o): in func
tion Ogre::FreeImageCodec::startup():src/OgreFreeImageCodec.cpp:134: error: unde
fined reference to 'FreeImage_SetOutputMessage'
D:/Android/NDK/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/
gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: D:/P
rojects/ogre-new/Repo/lib/libOgreMainStatic.a(OgreFreeImageCodec.cpp.o): in func
tion Ogre::FreeImageLoadErrorHandler(FREE_IMAGE_FORMAT, char const*):src/OgreFre
eImageCodec.cpp:61: error: undefined reference to 'FreeImage_GetFormatFromFIF'
D:/Android/NDK/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/
gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: D:/P
rojects/ogre-new/Repo/lib/libOgreMainStatic.a(OgreFreeImageCodec.cpp.o): in func
tion Ogre::FreeImageCodec::shutdown():src/OgreFreeImageCodec.cpp:143: error: und
efined reference to 'FreeImage_DeInitialise'
D:/Android/NDK/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/
gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: D:/P
rojects/ogre-new/Repo/lib/libOgreMainStatic.a(OgreFreeImageCodec.cpp.o): in func
tion Ogre::FreeImageCodec::decode(Ogre::SharedPtr<Ogre::DataStream>&) const:src/
OgreFreeImageCodec.cpp:411: error: undefined reference to 'FreeImage_OpenMemory'

D:/Android/NDK/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/
gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: D:/P
rojects/ogre-new/Repo/lib/libOgreMainStatic.a(OgreFreeImageCodec.cpp.o): in func
tion Ogre::FreeImageCodec::decode(Ogre::SharedPtr<Ogre::DataStream>&) const:src/
OgreFreeImageCodec.cpp:414: error: undefined reference to 'FreeImage_LoadFromMem
ory'
D:/Android/NDK/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/
gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: D:/P
rojects/ogre-new/Repo/lib/libOgreMainStatic.a(OgreFreeImageCodec.cpp.o): in func
tion Ogre::FreeImageCodec::decode(Ogre::SharedPtr<Ogre::DataStream>&) const:src/
OgreFreeImageCodec.cpp:427: error: undefined reference to 'FreeImage_GetWidth'
D:/Android/NDK/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/
gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: D:/P
rojects/ogre-new/Repo/lib/libOgreMainStatic.a(OgreFreeImageCodec.cpp.o): in func
tion Ogre::FreeImageCodec::decode(Ogre::SharedPtr<Ogre::DataStream>&) const:src/
OgreFreeImageCodec.cpp:428: error: undefined reference to 'FreeImage_GetHeight'
D:/Android/NDK/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/
gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: D:/P
rojects/ogre-new/Repo/lib/libOgreMainStatic.a(OgreFreeImageCodec.cpp.o): in func
tion Ogre::FreeImageCodec::decode(Ogre::SharedPtr<Ogre::DataStream>&) const:src/
OgreFreeImageCodec.cpp:434: error: undefined reference to 'FreeImage_GetImageTyp
e'
D:/Android/NDK/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/
gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: D:/P
rojects/ogre-new/Repo/lib/libOgreMainStatic.a(OgreFreeImageCodec.cpp.o): in func
tion Ogre::FreeImageCodec::decode(Ogre::SharedPtr<Ogre::DataStream>&) const:src/
OgreFreeImageCodec.cpp:435: error: undefined reference to 'FreeImage_GetColorTyp
e'
D:/Android/NDK/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/
gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: D:/P
rojects/ogre-new/Repo/lib/libOgreMainStatic.a(OgreFreeImageCodec.cpp.o): in func
tion Ogre::FreeImageCodec::decode(Ogre::SharedPtr<Ogre::DataStream>&) const:src/
OgreFreeImageCodec.cpp:436: error: undefined reference to 'FreeImage_GetBPP'
D:/Android/NDK/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/
gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: D:/P
rojects/ogre-new/Repo/lib/libOgreMainStatic.a(OgreFreeImageCodec.cpp.o): in func
tion Ogre::FreeImageCodec::decode(Ogre::SharedPtr<Ogre::DataStream>&) const:src/
OgreFreeImageCodec.cpp:551: error: undefined reference to 'FreeImage_GetBits'
D:/Android/NDK/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/
gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: D:/P
rojects/ogre-new/Repo/lib/libOgreMainStatic.a(OgreFreeImageCodec.cpp.o): in func
tion Ogre::FreeImageCodec::decode(Ogre::SharedPtr<Ogre::DataStream>&) const:src/
OgreFreeImageCodec.cpp:552: error: undefined reference to 'FreeImage_GetPitch'
D:/Android/NDK/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/
gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: D:/P
rojects/ogre-new/Repo/lib/libOgreMainStatic.a(OgreFreeImageCodec.cpp.o): in func
tion Ogre::FreeImageCodec::decode(Ogre::SharedPtr<Ogre::DataStream>&) const:src/
OgreFreeImageCodec.cpp:569: error: undefined reference to 'FreeImage_Unload'
D:/Android/NDK/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/
gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: D:/P
rojects/ogre-new/Repo/lib/libOgreMainStatic.a(OgreFreeImageCodec.cpp.o): in func
tion Ogre::FreeImageCodec::decode(Ogre::SharedPtr<Ogre::DataStream>&) const:src/
OgreFreeImageCodec.cpp:570: error: undefined reference to 'FreeImage_CloseMemory
'
D:/Android/NDK/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/
gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: D:/P
rojects/ogre-new/Repo/lib/libOgreMainStatic.a(OgreFreeImageCodec.cpp.o): in func
tion Ogre::FreeImageCodec::decode(Ogre::SharedPtr<Ogre::DataStream>&) const:src/
OgreFreeImageCodec.cpp:467: error: undefined reference to 'FreeImage_IsTranspare
nt'
D:/Android/NDK/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/
gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: D:/P
rojects/ogre-new/Repo/lib/libOgreMainStatic.a(OgreFreeImageCodec.cpp.o): in func
tion Ogre::FreeImageCodec::decode(Ogre::SharedPtr<Ogre::DataStream>&) const:src/
OgreFreeImageCodec.cpp:476: error: undefined reference to 'FreeImage_ConvertTo24
Bits'
D:/Android/NDK/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/
gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: D:/P
rojects/ogre-new/Repo/lib/libOgreMainStatic.a(OgreFreeImageCodec.cpp.o): in func
tion Ogre::FreeImageCodec::decode(Ogre::SharedPtr<Ogre::DataStream>&) const:src/
OgreFreeImageCodec.cpp:483: error: undefined reference to 'FreeImage_GetBPP'
D:/Android/NDK/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/
gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: D:/P
rojects/ogre-new/Repo/lib/libOgreMainStatic.a(OgreFreeImageCodec.cpp.o): in func
tion Ogre::FreeImageCodec::decode(Ogre::SharedPtr<Ogre::DataStream>&) const:src/
OgreFreeImageCodec.cpp:495: error: undefined reference to 'FreeImage_GetGreenMas
k'
D:/Android/NDK/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/
gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: D:/P
rojects/ogre-new/Repo/lib/libOgreMainStatic.a(OgreFreeImageCodec.cpp.o): in func
tion Ogre::FreeImageCodec::decode(Ogre::SharedPtr<Ogre::DataStream>&) const:src/
OgreFreeImageCodec.cpp:471: error: undefined reference to 'FreeImage_ConvertTo32
Bits'
D:/Android/NDK/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/
gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: D:/P
rojects/ogre-new/Repo/lib/libOgreMainStatic.a(OgreFreeImageCodec.cpp.o): in func
tion Ogre::FreeImageCodec::decode(Ogre::SharedPtr<Ogre::DataStream>&) const:src/
OgreFreeImageCodec.cpp:456: error: undefined reference to 'FreeImage_ConvertToGr
eyscale'
D:/Android/NDK/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/
gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: D:/P
rojects/ogre-new/Repo/lib/libOgreMainStatic.a(OgreZip.cpp.o): in function Ogre::
ZipDataStream::skip(long):src/OgreZip.cpp:369: error: undefined reference to 'zz
ip_seek'
D:/Android/NDK/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/
gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: D:/P
rojects/ogre-new/Repo/lib/libOgreMainStatic.a(OgreZip.cpp.o): in function Ogre::
ZipDataStream::seek(unsigned int):src/OgreZip.cpp:381: error: undefined referenc
e to 'zzip_seek'
D:/Android/NDK/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/
gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: D:/P
rojects/ogre-new/Repo/lib/libOgreMainStatic.a(OgreZip.cpp.o): in function Ogre::
ZipDataStream::tell() const:src/OgreZip.cpp:392: error: undefined reference to '
zzip_tell'
D:/Android/NDK/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/
gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: D:/P
rojects/ogre-new/Repo/lib/libOgreMainStatic.a(OgreZip.cpp.o): in function Ogre::
ZipDataStream::close():src/OgreZip.cpp:407: error: undefined reference to 'zzip_
file_close'
D:/Android/NDK/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/
gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: D:/P
rojects/ogre-new/Repo/lib/libOgreMainStatic.a(OgreZip.cpp.o): in function Ogre::
ZipArchive::unload():src/OgreZip.cpp:132: error: undefined reference to 'zzip_di
r_close'
D:/Android/NDK/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/
gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: D:/P
rojects/ogre-new/Repo/lib/libOgreMainStatic.a(OgreZip.cpp.o): in function Ogre::
ZipDataStream::read(void*, unsigned int):src/OgreZip.cpp:339: error: undefined r
eference to 'zzip_file_read'
D:/Android/NDK/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/
gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: D:/P
rojects/ogre-new/Repo/lib/libOgreMainStatic.a(OgreZip.cpp.o): in function Ogre::
ZipDataStream::read(void*, unsigned int):src/OgreZip.cpp:341: error: undefined r
eference to 'zzip_dirhandle'
D:/Android/NDK/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/
gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: D:/P
rojects/ogre-new/Repo/lib/libOgreMainStatic.a(OgreZip.cpp.o): in function Ogre::
ZipDataStream::read(void*, unsigned int):src/OgreZip.cpp:342: error: undefined r
eference to 'zzip_strerror_of'
D:/Android/NDK/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/
gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: D:/P
rojects/ogre-new/Repo/lib/libOgreMainStatic.a(OgreZip.cpp.o): in function Ogre::
ZipArchive::load():src/OgreZip.cpp:92: error: undefined reference to 'zzip_dir_o
pen_ext_io'
D:/Android/NDK/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/
gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: D:/P
rojects/ogre-new/Repo/lib/libOgreMainStatic.a(OgreZip.cpp.o): in function Ogre::
ZipArchive::load():src/OgreZip.cpp:97: error: undefined reference to 'zzip_dir_r
ead'
D:/Android/NDK/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/
gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: D:/P
rojects/ogre-new/Repo/lib/libOgreMainStatic.a(OgreZip.cpp.o): in function Ogre::
ZipArchive::open(std::string const&, bool) const:src/OgreZip.cpp:147: error: und
efined reference to 'zzip_file_open'
D:/Android/NDK/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/
gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: D:/P
rojects/ogre-new/Repo/lib/libOgreMainStatic.a(OgreZip.cpp.o): in function Ogre::
ZipArchive::open(std::string const&, bool) const:src/OgreZip.cpp:172: error: und
efined reference to 'zzip_dir_stat'
D:/Android/NDK/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/
gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: D:/P
rojects/ogre-new/Repo/lib/libOgreMainStatic.a(OgreZip.cpp.o): in function Ogre::
ZipArchive::open(std::string const&, bool) const:src/OgreZip.cpp:161: error: und
efined reference to 'zzip_error'
D:/Android/NDK/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/
gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: D:/P
rojects/ogre-new/Repo/lib/libOgreMainStatic.a(OgreZip.cpp.o): in function Ogre::
ZipArchive::open(std::string const&, bool) const:src/OgreZip.cpp:155: error: und
efined reference to 'zzip_file_open'
collect2: ld returned 1 exit status
make.exe: *** [obj/local/armeabi/libOgreJNI.so] Error 1
jom: D:\Projects\ogre-new\Repo\CMakeFiles\OgreJNIDummy.dir\build.make [lib\libOg
reJNIDummy.so] Error 2
jom: D:\Projects\ogre-new\Repo\CMakeFiles\Makefile2 [CMakeFiles\OgreJNIDummy.dir
\all] Error 2
jom: D:\Projects\ogre-new\Repo\Makefile [all] Error 2

D:\Projects\ogre-new\Repo>
The build command I'm using is the following:

Code: Select all

cmake -G"NMake Makefiles" -DCMAKE_TOOLCHAIN_FILE=cmake\toolchain\android.toolchain.cmake -DOGRE_DEPENDENCIES_DIR=AndroidDependencies -DANDROID_ABI=armeabi -DANDROID_NATIVE_API_LEVEL=19 .
I downloaded the dependencies from Wolfman's link, and I'm using NDK r9d x86. (It wouldn't even recognize x64)

Also for some reason the sample browser on Play Store is getting stuck at a black screen. The tablet I'm running it on is a new Toshiba Excite Pure, running a NVIDIA Tegra 3.
0 x
BitBucket username changed to iboshkov (from MindCalamity)
Do you need help? What have you tried?
- xavier
---------------------
HkOgre - a Havok Integration for OGRE | Simple SSAO | My Blog | My YouTube | My DeviantArt

paroj
OGRE Team Member
OGRE Team Member
Posts: 306
Joined: Sun Mar 30, 2014 2:51 pm
Contact:

Re: Android build quick start guide

Post by paroj » Wed Apr 23, 2014 5:48 pm

affentanz wrote:I found the error! You have to choose the x86 NDK version, even if you're on a 64 bit system.
or update the android.toolchain - then it also works with 64bit systems.
0 x

Slicky
Bronze Sponsor
Bronze Sponsor
Posts: 410
Joined: Mon Apr 14, 2003 11:48 pm
Location: Los Angeles, CA

Re: Android build quick start guide

Post by Slicky » Sat May 03, 2014 6:02 pm

To build for multiple targets do the ogre libs end up being built into two separate sets?

I would imagine that they might.

So to target armeabi and armabi-v7a do you have 2 separate directory structures?
0 x

Clonkex
Gnoblar
Posts: 24
Joined: Fri Jul 13, 2012 3:21 am
Location: Northern Tablelands, NSW, Australia

Re: Android build quick start guide

Post by Clonkex » Fri May 16, 2014 8:44 am

Hey all,

I'm trying to build for Android, but I'm having problems. I'm following the quick-start guide here: http://www.ogre3d.org/tikiwiki/tiki-ind ... on=Android

The problem is that cmake fails to find the great bulk of the external libraries. I have AndroidDependencies (precompiled, downloaded from link in wiki, unzipped directly to C:\ZVCLibraries\ogre_scr_v1-9-0\ogre\AndroidDependencies) and the latest 1.9 branch pulled today with Mercurial.

Here's the console output from running the cmake command:

Code: Select all

C:\ZVCLibraries\ogre_scr_v1-9-0\ogre\BuildAndroid>cmake -G"NMake Makefiles" -DCM
AKE_TOOLCHAIN_FILE=..\cmake\toolchain\android.toolchain.cmake -DOGRE_DEPENDENCIE
S_DIR=..\AndroidDependencies -DANDROID_ABI=armeabi -DANDROID_NATIVE_API_LEVEL=9
..
-- Configuring OGRE 1.10.0unstable
-- Check size of void*
-- Check size of void* - done
-- Performing Test OGRE_GCC_HAS_SSE
-- Performing Test OGRE_GCC_HAS_SSE - Failed
-- Performing Test OGRE_GCC_VISIBILITY
-- Performing Test OGRE_GCC_VISIBILITY - Success
-- Detected g++ 4.8

-- Enabling GCC visibility flags
-- Search path: C:/ZVCLibraries/ogre_scr_v1-9-0/ogre/AndroidDependencies;C:/ZVCL
ibraries/ogre_scr_v1-9-0/ogre/BuildAndroid/Dependencies;C:/ZVCLibraries/ogre_scr
_v1-9-0/ogre/Dependencies;C:/ZVCLibraries/ogre_scr_v1-9-0/ogre/BuildAndroid/../D
ependencies;C:/ZVCLibraries/ogre_scr_v1-9-0/ogre/../Dependencies
-- Looking for ZLIB...
-- Found ZLIB: optimized;C:/AndroidDev/android-ndk-r9d/platforms/android-9/arch-
arm/usr/lib/libz.so;debug;C:/AndroidDev/android-ndk-r9d/platforms/android-9/arch
-arm/usr/lib/libz.so
-- Looking for ZZip...
-- Could not locate ZZip
-- Looking for FreeImage...
-- Could not locate FreeImage
-- Looking for FREETYPE...
-- CMAKE_PREFIX_PATH: C:/ZVCLibraries/ogre_scr_v1-9-0/ogre/AndroidDependencies;C
:/ZVCLibraries/ogre_scr_v1-9-0/ogre/BuildAndroid/Dependencies;C:/ZVCLibraries/og
re_scr_v1-9-0/ogre/Dependencies;C:/ZVCLibraries/ogre_scr_v1-9-0/ogre/BuildAndroi
d/../Dependencies;C:/ZVCLibraries/ogre_scr_v1-9-0/ogre/../Dependencies;/usr/loca
l;/usr/lib/armv5te-linux-gnu
-- CMAKE_PREFIX_PATH: C:/ZVCLibraries/ogre_scr_v1-9-0/ogre/AndroidDependencies;C
:/ZVCLibraries/ogre_scr_v1-9-0/ogre/BuildAndroid/Dependencies;C:/ZVCLibraries/og
re_scr_v1-9-0/ogre/Dependencies;C:/ZVCLibraries/ogre_scr_v1-9-0/ogre/BuildAndroi
d/../Dependencies;C:/ZVCLibraries/ogre_scr_v1-9-0/ogre/../Dependencies;/usr/loca
l;/usr/lib/armv5te-linux-gnu
-- Could not locate FREETYPE
-- Could NOT find OpenGL (missing:  OPENGL_gl_LIBRARY)
-- Looking for POCO...
-- Could not locate POCO
-- Looking for TBB...
-- Could not locate TBB
-- Looking for GLSL_Optimizer...
-- GLSL_Optimizer_PREFIX_PATH changed.
-- Could not locate GLSL_Optimizer
-- Looking for HLSL2GLSL...
-- HLSL2GLSL_PREFIX_PATH changed.
-- Could not locate HLSL2GLSL
-- Looking for OIS...
-- OIS_PREFIX_PATH changed.
-- Could not locate OIS
-- Could NOT find Doxygen (missing:  DOXYGEN_EXECUTABLE)
-- Looking for Softimage...
-- Softimage_PREFIX_PATH changed.
-- Could not locate Softimage
-- Could NOT find TinyXML (missing:  TINYXML_INCLUDE_DIR TINYXML_LIBRARIES)
-- Looking for CppUnit...
-- Could not locate CppUnit
--
-----------------------------------------------------------------------------
-- The following external packages were located on your system.
-- This installation will have the extra features provided by these packages.
+ zlib
+ OpenGL ES 1.x
+ OpenGL ES 2.x
+ OpenGL ES 3.x
-----------------------------------------------------------------------------
-- The following OPTIONAL packages could NOT be located on your system.
-- Consider installing them to enable more features from this software.
+ zziplib: Extract data from zip archives <http://zziplib.sourceforge.net>
+ freeimage: Support for commonly used graphics image formats <http://freeimage.
sourceforge.net>
+ freetype: Portable font engine <http://www.freetype.org>
+ OpenGL 3+: Support for the OpenGL 3+ render system <http://www.opengl.org/>
+ boost: Boost (general) <http://boost.org>
+ boost-thread: Used for threading support <http://boost.org>
+ boost-date_time: Used for threading support <http://boost.org>
+ POCO: POCO framework <http://pocoproject.org/>
+ tbb: Threading Building Blocks <http://www.threadingbuildingblocks.org/>
+ GLSL Optimizer: GLSL Optimizer <http://github.com/aras-p/glsl-optimizer/>
+ HLSL2GLSL: HLSL2GLSL <http://hlsl2glslfork.googlecode.com/>
+ OIS: Input library needed for the samples <http://sourceforge.net/projects/wgo
is>
+ Doxygen: Tool for building API documentation <http://doxygen.org>
+ Softimage: Softimage SDK needed for building XSIExporter <FALSE>
+ TinyXML: TinyXML needed for building OgreXMLConverter <FALSE>
+ CppUnit: Library for performing unit tests <http://cppunit.sourceforge.net>
-----------------------------------------------------------------------------

--
----------------------------------------------------------------------------
  FEATURE SUMMARY
----------------------------------------------------------------------------

Building components:
  + Paging
  + MeshLodGenerator
  + Terrain
  + RTShader System
  + RTShader System Core Shaders
  + RTShader System Extensions Shaders
  + Volume
Building plugins:
  + Octree scene manager
  + Particle FX
Building rendersystems:
  + OpenGL ES 2.x
Building core features:
  + Mesh Lod
  + DDS image codec
  + PVRTC image codec
  + ETC image codec

Build type:                      static
Threading support:               none
Use double precision:            disabled
Assert mode:                     standard
Allocator type:                  nedmalloc (pooling)
STL containers use allocator:    enabled
Strings use allocator:           disabled
Memory tracker (debug):          disabled
Memory tracker (release):        disabled
Use Boost:                       disabled

----------------------------------------------------------------------------

-- Configuring done
-- Generating done
-- Build files have been written to: C:/ZVCLibraries/ogre_scr_v1-9-0/ogre/BuildA
ndroid
As you can see, one of the search paths appears to be correct, but it fails miserably at actually finding the libraries. What have I done wrong?
0 x

User avatar
c6burns
Beholder
Posts: 1511
Joined: Fri Feb 22, 2013 4:44 am
Location: Deep behind enemy lines

Re: Android build quick start guide

Post by c6burns » Fri May 16, 2014 8:12 pm

Just to confirm ... inside <src dir>/AndroidDependencies it looks like:
<src dir>/AndroidDependencies/include
<src dir>/AndroidDependencies/lib

?
0 x

Clonkex
Gnoblar
Posts: 24
Joined: Fri Jul 13, 2012 3:21 am
Location: Northern Tablelands, NSW, Australia

Re: Android build quick start guide

Post by Clonkex » Sat May 17, 2014 2:37 pm

Just to confirm ... inside <src dir>/AndroidDependencies it looks like:
<src dir>/AndroidDependencies/include
<src dir>/AndroidDependencies/lib

?
Yes, that's correct.
0 x

Slicky
Bronze Sponsor
Bronze Sponsor
Posts: 410
Joined: Mon Apr 14, 2003 11:48 pm
Location: Los Angeles, CA

Re: Android build quick start guide

Post by Slicky » Mon May 19, 2014 5:53 pm

For the two stand alone sample apps in the Android SDK is there a cmake or project file? Working out all the headers and more importantly the correct preprocessor etc etc is hard without an easier way to create a project that will build.

I am using Visual Studio.
0 x

espenator
Gnoblar
Posts: 3
Joined: Thu Aug 29, 2013 2:12 pm

Re: Android build quick start guide

Post by espenator » Mon Jun 23, 2014 8:26 pm

Hi all,

I'm trying to get started on Android development with Ogre, and I've been working off the wiki quick start guide, as well as a couple of other writeups to get the Ogre source compiled, but I'm having problems getting the RenderSystem_GLES2 project to compile. I've tried with both the stable Ogre 1.9 and the latest unstable 1.10, but get the same result. I'm using the latest precompiled Android Deps as described in the first post of this thread, and I've tried with both Android API 10 and the latest 19, but still no dice. The only way I can get the project to compile is the set the OGRE CMake variable OGRE_CONFIG_ENABLE_GLES3_SUPPORT, but I understand this is still unsupported by most Android devices, and it only results in a black screen and hang/crash of the SampleBrowserNDK APK app when I install the debug app on my Galaxy S4. The SampleBrowser from the Android Play Store works fine, btw.

GLES2_OPTIMIZER true/false in the Cmake GUI makes no difference, the compilation of the RenderSystem_GLES2 project always throws the following error (Win7 x86):

Code: Select all

[ 67%] Building CXX object RenderSystems/GLES2/CMakeFiles/RenderSystem_GLES2.dir/src/gles2w.cpp.o
In file included from E:\Work\sdk\android\ogre3d\RenderSystems\GLES2\src\gles2w.cpp:1:0:
E:\Work\sdk\android\ogre3d\RenderSystems\GLES2\include/GLES2/gles2w.h:194:63: error: typedef 'PFNGLDEBUGMESSAGECALLBACKKHRPROC' is initialized (use decltype instead)
 typedef void (GL_APIENTRY* PFNGLDEBUGMESSAGECALLBACKKHRPROC) (GLDEBUGPROCKHR callback, const void *userParam);
                                                               ^
E:\Work\sdk\android\ogre3d\RenderSystems\GLES2\include/GLES2/gles2w.h:194:63: error: 'GLDEBUGPROCKHR' was not declared in this scope
E:\Work\sdk\android\ogre3d\RenderSystems\GLES2\include/GLES2/gles2w.h:194:88: error: expected primary-expression before 'const'
 typedef void (GL_APIENTRY* PFNGLDEBUGMESSAGECALLBACKKHRPROC) (GLDEBUGPROCKHR callback, const void *userParam);
                                                                                        ^
E:\Work\sdk\android\ogre3d\RenderSystems\GLES2\include/GLES2/gles2w.h:226:16: error: ISO C++ forbids declaration of 'GLsync' with no type [-fpermissive]
 typedef GLsync (GL_APIENTRY* PFNGLFENCESYNCAPPLEPROC) (GLenum condition, GLbitfield flags);
There are more compilation errors after this, but they're pretty much the same as the ones above.

Does anyone have any ideas or pointers as to what I might be doing wrong? I'm running out of ideas here...
0 x

Clonkex
Gnoblar
Posts: 24
Joined: Fri Jul 13, 2012 3:21 am
Location: Northern Tablelands, NSW, Australia

Re: Android build quick start guide

Post by Clonkex » Tue Jun 24, 2014 1:21 am

@espenator:

I'm afraid I may be on no use to you, and probably others will be more helpful, but I'll try anyway.

My first question is what are you compiling with? You probably assume there is only one way, but I'd just be curious to get an idea of what you're trying, given it's a compiler error.
0 x

espenator
Gnoblar
Posts: 3
Joined: Thu Aug 29, 2013 2:12 pm

Re: Android build quick start guide

Post by espenator » Tue Jun 24, 2014 7:43 am

Clonkex wrote:@espenator:

I'm afraid I may be on no use to you, and probably others will be more helpful, but I'll try anyway.

My first question is what are you compiling with? You probably assume there is only one way, but I'd just be curious to get an idea of what you're trying, given it's a compiler error.
Thanks for the reply Clonkex. I'm compiling with MinGW nmake (from VS2013 command prompt), the CMAKE_MAKE_PROGRAM variable has been set to the Android NDK Windows make.exe through CMake GUI.
0 x

User avatar
c6burns
Beholder
Posts: 1511
Joined: Fri Feb 22, 2013 4:44 am
Location: Deep behind enemy lines

Re: Android build quick start guide

Post by c6burns » Tue Jun 24, 2014 8:34 am

Isn't nmake part of visual studio and not mingw? Also if you used the CMake GUI then you aren't following the quickstart guide
0 x

espenator
Gnoblar
Posts: 3
Joined: Thu Aug 29, 2013 2:12 pm

Re: Android build quick start guide

Post by espenator » Tue Jun 24, 2014 8:59 am

c6burns wrote:Isn't nmake part of visual studio and not mingw? Also if you used the CMake GUI then you aren't following the quickstart guide
You're right c6burns, nmake is a part of VS, not MinGW. Since we use CMakeGUI for our other projects at work I was more familiar with that rather than setting properties from the command line, and I figured the output should be the same regardless of which way the properties were set... Apparently that's not the case, as I'm seeing now that the generated ogre solution from the command line cmake script is different (smaller) than the one generated by CMake GUI. Running nmake after the cmake script finally compiled the RenderSystem_GLES2 project correctly, I guess I should have followed the quickstart guide to the dot... :?

Btw, I've been glancing at this other writeup as well, which uses the CMake GUI instead of the command line: http://www.jamesbaltar.com/blog/compili ... r-android/. Maybe that's what messed me up...

Thanks for the replies!
0 x

User avatar
c6burns
Beholder
Posts: 1511
Joined: Fri Feb 22, 2013 4:44 am
Location: Deep behind enemy lines

Re: Android build quick start guide

Post by c6burns » Tue Jun 24, 2014 10:33 am

No problem, I can't explain why the GUI doesn't work the same, but it doesn't :D
0 x

Post Reply