编译irrlicht-android端口(Mac OSX)时出错
我从这里下载了irrlicht android: : 我曾尝试使用ndk build编译irllicht android,但出现以下错误:编译irrlicht-android端口(Mac OSX)时出错,android,macos,android-ndk,irrlicht,ndk-build,Android,Macos,Android Ndk,Irrlicht,Ndk Build,我从这里下载了irrlicht android: : 我曾尝试使用ndk build编译irllicht android,但出现以下错误: 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
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
有人知道如何解决这个问题吗??任何帮助都将不胜感激。在os.cpp中(在/jni目录中),将代码从以下位置更改:
__android_log_print(ANDROID_LOG_INFO, "log", message);
致:
已解决此问题,但仍出现错误:
In file included from jni/importgl.cpp:55:0:
jni/importgl.h:37:22: fatal error: GLES/egl.h: No such file or directory
正在处理它。找到了问题的解决方案,在project/default.Properties中,我已更改:
target=android-4
到
在include/IrrCompileConfig.h中,我已注释掉:
//#define _IRR_COMPILE_WITH_OGLES1_
因为我只需要OpenGLES2。这就解决了问题,irrlichandroid
使用ndk build
,libirrlicht.so
在我的项目libs
文件夹中生成的文件成功编译
target=android-18
//#define _IRR_COMPILE_WITH_OGLES1_