C++17 support for Android/iOS?

C++17 support for Android/iOS?
0.0 0


What’s your minSDK for Android? Did you test also such a device?


minSDK is 14, as default from the cocos project.
So in theory Android 4.x devices and up should run, I haven’t tested it on older devices yet, but I think i have a motorola xoom with 4.x where i’ll be able to test it on later…

And I’m on the latest NDK 17


And your targetSdk for the NDK is 14 (lowest possible Android version) or something newer?


I’ve tested it with 27 and 14 and it works so far.


I’ve tested it on my Motorola Xoom which is currently my only old device where i can test it on, and it seems like 3.17 in General doesn’t work on it, because I’ve created an empty new cocos Project with the Default Settings. Even though ist API 15 .

The main issues is:

06-10 10:47:27.740 3593-3593/? D/OpenGLRenderer: Flushing caches (mode 1)
06-10 10:47:27.760 15107-15107/? D/dalvikvm: Trying to load lib /data/data/com.gaga.mehl/lib/libMyGame.so 0x4109efc8
06-10 10:47:27.820 15107-15107/? A/libc: Fatal signal 4 (SIGILL) at 0x5b7d2d1c (code=1)
06-10 10:47:28.249 162-176/? W/ActivityManager: Activity pause timeout for ActivityRecord{41153af0 com.gaga.mehl/org.cocos2dx.cpp.AppActivity}
06-10 10:47:28.330 6948-6948/? I/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
Build fingerprint: ‘MOTO/RTDACH/wifi_hubble:4.0.4/I.7.1-42/1336408583:user/ota-rel-keys,release-keys’
pid: 15107, tid: 15107 >>> com.gaga.mehl <<<
signal 4 (SIGILL), code 1 (ILL_ILLOPC), fault addr 5b7d2d1c
r0 00000000 r1 400e4688 r2 5be677e7 r3 5bf7ac90
r4 007a7f7a r5 5bf6d000 r6 00000004 r7 00003ef0
r8 b0012fa8 r9 5bf77000 10 00a34000 fp 5b547000
ip ffffff20 sp be9734c8 lr 400a7250 pc 5b7d2d1c cpsr 60000030
d0 000000003f000000 d1 000000003f000000
d2 000000003dcccccd d3 000000003dcccccd
d4 0000000000000000 d5 0000000000000000
d6 0000000000000000 d7 0000000000000000
d8 0000000000000000 d9 0000000000000000
d10 0000000000000000 d11 0000000000000000
d12 0000000000000000 d13 0000000000000000
d14 0000000000000000 d15 0000000000000000
scr 80000012
06-10 10:47:28.450 6948-6948/? I/DEBUG: #00 pc 0028bd1c /data/data/com.gaga.mehl/lib/libMyGame.so
#01 lr 400a7250 /system/lib/libc.so
code around pc:
5b7d2cfc 21004c14 6020447c ea18f7cd 46214812 .L.!|D `…H!F
5b7d2d0c 44784d12 6800447d f7c8462a 4c10ea98 .MxD}D.hF…L
5b7d2d1c 0050efc0 447ca00f 0f08f844 0014f104 …P…|DD…
5b7d2d2c 0a8ff940 f9401d20 46200a8f ece4f7f5 @… .@… F…
06-10 10:47:28.460 6948-6948/? I/DEBUG: 5b7d2d3c 4621480a 4478462a e8bd6800 f3e940b0 .H!F
code around lr:
400a7230 08bd87f0 e5964000 e5967000 e2144903 …@…p…I…
400a7240 1a00000f f57ff05f e5965000 ebffecef …_…P…
400a7250 e2055a02 e3853001 e1500003 0a000006 .Z…0…P…
400a7260 e5865000 e1a00006 e1a01005 e3a02001 .P… …
400a7270 ebfffede e1a00004 e8bd87f0 e3a00000 …
memory map around addr 5b7d2d1c:
5b3a8000-5b547000 /data/dalvik-cache/data@app@com.gaga.mehl-2.apk@classes.dex
5b547000-5bf42000 /data/data/com.gaga.mehl/lib/libMyGame.so
5bf42000-5bf77000 /data/data/com.gaga.mehl/lib/libMyGame.so
be973488 5bf7ac90
be97348c 50f05000
be973490 5bf6d000 /data/data/com.gaga.mehl/lib/libMyGame.so
be973494 400c10cb /system/lib/libc.so
be973498 400d855c /system/lib/libc.so
be97349c 400b4207 /system/lib/libc.so
be9734a0 5be677e7 /data/data/com.gaga.mehl/lib/libMyGame.so
be9734a4 5bf7ac90
be9734a8 5bf7ac90
be9734ac 5bf6d000 /data/data/com.gaga.mehl/lib/libMyGame.so
be9734b0 00000004
be9734b4 00003ef0
be9734b8 b0012fa8
be9734bc 5bf77000
be9734c0 df0027ad
be9734c4 00000000
#00 be9734c8 5bf42a74 /data/data/com.gaga.mehl/lib/libMyGame.so
be9734cc 00000001
be9734d0 00003ef0
be9734d4 b0003a43 /system/bin/linker
be9734d8 b000e330
be9734dc 5bf5c4dc /data/data/com.gaga.mehl/lib/libMyGame.so
be9734e0 0000002c
be9734e4 b00046b3 /system/bin/linker
be9734e8 00a2ed34
be9734ec 00000000
be9734f0 b000e330
be9734f4 b000e330
be9734f8 01f71d75 [heap]
be9734fc 00000118
be973500 00000000
be973504 b000e330
be973508 b00130dc
be97350c 0000002c

Not really sure what the cause for it is, I’ve found an old issue for cocos on GitHub with an signal 4 (SIGILL), code 1 (ILL_ILLOPC), for armv7 with NEON, but not sure if this is the case here.


not sure if it is related to this:


SIGILL is illegal processor instruction, which mean wrong target architecture.


yeah I’ve compiled it with armeabi-v7a and the xoom should support it, thats why its strange


Did you see https://github.com/cocos2d/cocos2d-x/issues/9968 ?


yeah I’ve mentioned it above

“Not really sure what the cause for it is, I’ve found an old issue for cocos on GitHub with an signal 4 (SIGILL), code 1 (ILL_ILLOPC), for armv7 with NEON, but not sure if this is the case here.”

I’ve tired to turn off NEON , I think it was “-DANDROID_ARM_NEON=TRUE” to =FALSE ? that was the only NEON reference i could find in my project.