Lime rebuil android

Hi! I got a question about android lime rebuilding. I read topics about it, but they are from half year or more ago. Should I rebuild with -Dlegacy, or something have changed until today?

It depends on if you use -Dlegacy with OpenFL or not, Flixel adopts to use -Dlegacy by default but OpenFL on its own does not.

Thank You for reply.
Sorry for probably dumb question, but I try to rebuild android on linux running

lime rebuild android

and got unrecognised “-std=c++11”.
Removing this switch on nonlegacy lime should lead to error in compiling (nullptr), but I did’t tried it yet. Android version in package from lib.haxe site were compiled on Mac/win? Or could I got something bad with setup?
Apps compiled for android with lime from lib.haxe works.

This is my output:

arm-linux-androideabi-g++ -Iinclude -Ilib/cairo/include -Ilib/cairo/include/configs/
default/ -DLIME_CAIRO -DHAVE_CONFIG_H -DCAIRO_HAS_FT_FONT -Ilib/curl/include/ -DLIME_CURL 
-DCURL_STATICLIB -Ilib/jpeg/ -DLIME_JPEG -Ilib/freetype/include -DLIME_FREETYPE 
-Ilib/harfbuzz/src -DLIME_HARFBUZZ -Ilib/lzma/src -DLIME_LZMA -Ilib/ogg/include/ -Ilib/vorbis/include/ 
-DLIME_OGG -Ilib/openal-android/include/ -DLIME_OPENAL -DAL_LIBTYPE_STATIC=1 
-DLIME_OPENGL -Ilib/png/ -Ilib/zlib/ -DLIME_PNG -Ilib/sdl/include/ -Ilib/sdl/include/configs/default/ 
-DHAVE_LIBC -DLIME_SDL --sysroot=/opt/android-ndk/platforms/android-9/arch-arm -I/opt/android-
ndk/sources/cxx-stl/gnu-libstdc++/4.4.3/include -I/opt/android-ndk/sources/cxx-stl/gnu-libstdc++/4.4.3
/libs/armeabi/include -DHXCPP_VISIT_ALLOCS -DHXCPP_API_LEVEL=0 -I/home/az/haxelib/hxcpp
/3,2,205/include -Iinclude -fpic -fvisibility=hidden -ffunction-sections -funwind-tables 
-fstack-protector -fno-short-enums "-D_LINUX_STDDEF_H " -Wno-psabi -DHXCPP_CPP11 -D__ARM_ARCH_5__ 
-D__ARM_ARCH_5T__ -D__ARM_ARCH_5E__ -D__ARM_ARCH_5TE__ -march=armv5te 
-mtune=xscale -msoft-float -fomit-frame-pointer -fexceptions -fno-strict-aliasing -finline-limit=10000 
-DANDROID=ANDROID -DHX_ANDROID -DHXCPP_ANDROID_PLATFORM=9 -Wa,--noexecstack -O2 
-DNDEBUG -c -x c++ -Wno-invalid-offsetof -frtti -std=c++11 ./src/ExternalInterface.cpp -o/home/az/haxelib/lime/
lime/project/obj/android/62ddd6a3_ExternalInterface.obj
Error: cc1plus: error: unrecognized command line option "-std=c++11"

I think you need an older HXCPP, or newer Android NDK. HXCPP tries to set “-std=c++11” which is not recognized by older Android NDKs. I’m using r11e or something on the build server now, and it’s working fine

1 Like

Thank You :slight_smile: I removed flag manually and lib is being built. I got ndk from lime install script, and I thought that I should use only those packages. So I didn’t even check what those packages are.
Sorry for troubling You with this issue :confused: .
Best regards, Ret