Question

I'v downloaded irrlicht android from here:

https://gitorious.org/irrlichtandroid/irrlichtandroid/source/f12c3b9743d64dc5cd61931f40e42e8ca64b40ef:

I'v tried to compile irllicht android using ndk-build, I get the following errors:

 In static member function 'static void irr::os::Printer::log(const c8*, irr::ELOG_LEVEL)':
error: format not a string literal and no format arguments [-Werror=format-security]
In static member function 'static void irr::os::Printer::log(wchar_t const*, irr::ELOG_LEVEL)':
 error: format not a string literal and no format arguments [-Werror=format-security]
In static member function 'static void irr::os::Printer::log(const c8*, const c8*, irr::ELOG_LEVEL)':
error: format not a string literal and no format arguments [-Werror=format-security]
In static member function 'static void irr::os::Printer::log(const c8*, const path&, irr::ELOG_LEVEL)':
error: format not a string literal and no format arguments [-Werror=format-security]
make: *** [obj/local/armeabi/objs/irrlicht/os.o] Error 1

Does anyone know how to solve this issue?? any help will be appreciated.

Was it helpful?

Solution

Found the solution for the issue, In project/default.propeties , I have changed:

target=android-4

to

target=android-18

And in include/IrrCompileConfig.h I have commented out:

//#define _IRR_COMPILE_WITH_OGLES1_

since I need only OpenGL ES 2. This solved the issue , irrlichtandroid compiled successfully using ndk-build , libirrlicht.so file generated in my project libs folder.

OTHER TIPS

In os.cpp(inside /jni directory), changing the code from:

 __android_log_print(ANDROID_LOG_INFO, "log", message);

to:

 __android_log_print(ANDROID_LOG_INFO, "log","%s", message);

solved this issue, but still an error occurs:

In file included from jni/importgl.cpp:55:0:
jni/importgl.h:37:22: fatal error: GLES/egl.h: No such file or directory

Working on it.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top