NDK r10c Android-21 stdlib.h issues

This is a warning to everyone to be careful when upgrading to Android NDK r10c.
In the Android-21 platform headers, some functions have been changed (inline issues) resulting in your game no longer running due to a "cannot locate ‘function’ " error, for example: "cannot locate ‘srand’ ".

More on the topic: http://stackoverflow.com/questions/25475055/android-ndk-load-library-cannot-locate-srand/25492139#25492139

I went back to r10b, as that one works fine for me (I had the srand issue).

So if you’re thinking about updating, please back up your current NDK folder, and try the new one (full rebuild and run game) before getting rid of your old one.

Kind regards,
Michaël

1 Like

thanks for the heads up.

The problem is that a lot of stdlib functionality has been moved into an so, and therefor apps build against Android-21 will only run on Android 5. If you try to run them on a lower android, you will get the cannot locate error.

I’m currently using NDK r10c with target platform Android-19, and now my game works fine using android 4.4.2 and android 5. With NDK r10b, I couldn’t use fonts (game would hang with a black screen).

I’m not using any lua stuff, so I can’t judge if that works fine with NDK r10c…

But for those running into black screen issues on Android 5, updating to Cocos2d-x v3.3rc0 + NDK r10c + target platform 19 works.

thanks. I’ve just tried to compile “HEAD” and with NDK r10c + gcc4.9 but it is not linking due to a issue with libcurl… mmm.

I’ll try with gcc 4.8 to see if it is related to that.

UPDATE: no… I still can’t compile cocos2d-x on android. I know that it was working for me a few weeks ago. I guess that the new updated libcurl was compiled differently.