Reputation: 2565
I'v downloaded irrlicht android from here:
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.
Upvotes: 1
Views: 440
Reputation: 2565
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.
Upvotes: 2
Reputation: 2565
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.
Upvotes: 0