我从这里下载了irrlicht android:

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

我尝试使用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 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


有谁知道如何解决这个问题?任何帮助将不胜感激。

最佳答案

找到了问题的解决方案,在project / default.propeties中,我进行了更改:

target=android-4




target=android-18


在include / IrrCompileConfig.h中,我已注释掉:

//#define _IRR_COMPILE_WITH_OGLES1_


因为我只需要OpenGL ES2。这就解决了问题,irrlichtandroid使用项目ndk-build文件夹中生成的libirrlicht.solibs文件成功编译了。

10-08 19:23