Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I was trying to compile the Irrlicht port for Android but I continue getting errors while following these instructions.

I created a jni folder inside my project folder and the contents looked like this,

PROJECT/jni/Application.mk
PROJECT/jni/l.sh
PROJECT/jni/MakeAndroid.py

Then I went into the console and navigated to the PROJECT/jni/project/jni folder. From there I typed "ndk-build" and I got the following errors,

Compile++ arm    : irrlicht <= importgl.cpp
Compile++ arm    : irrlicht <= app-android.cpp
Compile++ arm    : irrlicht <= android-activity.cpp
Compile++ arm    : irrlicht <= android-receiver.cpp
Compile++ arm    : irrlicht <= CIrrDeviceAndroid.cpp
Compile++ arm    : irrlicht <= CVideoModeList.cpp
Compile++ arm    : irrlicht <= CFPSCounter.cpp
Compile++ arm    : irrlicht <= CNullDriver.cpp
Compile++ arm    : irrlicht <= COGLESDriver.cpp
Compile++ arm    : irrlicht <= COGLESTexture.cpp
Compile++ arm    : irrlicht <= COGLESExtensionHandler.cpp
Compile++ arm    : irrlicht <= CColorConverter.cpp
Compile++ arm    : irrlicht <= CImage.cpp
Compile++ arm    : irrlicht <= CImageLoaderBMP.cpp 
Compile++ arm    : irrlicht <= CImageLoaderJPG.cpp
Compile++ arm    : irrlicht <= CImageLoaderPCX.cpp
Compile++ arm    : irrlicht <= CImageLoaderPNG.cpp
Compile++ arm    : irrlicht <= CImageLoaderPSD.cpp
Compile++ arm    : irrlicht <= CImageLoaderTGA.cpp
Compile++ arm    : irrlicht <= CImageLoaderPPM.cpp
Compile++ arm    : irrlicht <= CImageLoaderWAL.cpp
Compile++ arm    : irrlicht <= CImageLoaderRGB.cpp
Compile++ arm    : irrlicht <= CImageWriterBMP.cpp
Compile++ arm    : irrlicht <= CImageWriterJPG.cpp
Compile++ arm    : irrlicht <= CImageWriterPCX.cpp
Compile++ arm    : irrlicht <= CImageWriterPNG.cpp
Compile++ arm    : irrlicht <= CImageWriterPPM.cpp
Compile++ arm    : irrlicht <= CImageWriterPSD.cpp
Compile++ arm    : irrlicht <= CImageWriterTGA.cpp
Compile++ arm    : irrlicht <= COGLES2Driver.cpp
In file included from /home/cmetrolis/NetBeansProjects/MyProject/jni/project/jni/COGLES2Driver.h:44,
         from /home/cmetrolis/NetBeansProjects/MyProject/jni/project/jni/COGLES2Driver.cpp:6:
/home/cmetrolis/NetBeansProjects/MyProject/jni/project/jni/COGLES2ExtensionHandler.h:18:23: error: GLES2/gl2.h: No such file or directory

I cut out a ton of the errors after this, but they mostly all say "No such file or directory". Any idea what I am doing wrong?

share|improve this question
add comment

1 Answer 1

up vote 2 down vote accepted

The problem is the Application.mk, you need at least android platform 2.0 for OGLES 2.0. In your application.mk, add this line:

APP_PLATFORM := android-6

Look at the project/default.properties:

target=android-8
share|improve this answer
    
Thanks for your help Ellis. Should I add this to all Android.mk files? Or just the top most level one? Because there is one under PROJECT/jni/ and one under PROJECT/jni/project/jni –  Metropolis Oct 6 '11 at 15:00
    
PROJECT/jni/Application.mk –  Ellis Oct 6 '11 at 15:18
    
Adding APP_PLATFORM := android-6 to the Android.mk file did not fix it. I am still getting an error at the same place. –  Metropolis Oct 6 '11 at 18:55
    
look into the default.properties and add target=android-8 –  Ellis Oct 6 '11 at 19:13
    
That worked! Thanks Ellis! –  Metropolis Oct 7 '11 at 2:03
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.