对C++进行优化了的android-ndk-r6-crystax-2

改进Android NDK支持宽字符
本文介绍了一个定制的Android NDK发行版,专注于改善官方NDK,特别针对宽字符支持进行了优化。提供了在编译现有代码到Android时解决链接问题的策略。

https://www.crystax.net/en/android/ndk/6?id=6

 

Here is customized distribution of Android NDK r6 which I have rebuilt from official sources. Starting from NDK r5, Google added support of C++ exceptions, RTTI and STL to the official NDK. That's good but not enough for many peoples including me. Starting from r5-crystax-1, main goal of this project will be improvements of official NDK (after all, this is the best way to integrate such improvements into mainline - that's how it was with full C++ support in Google's NDK).

One of such big improvements is C++ standard conformant support of wide chars (wide strings, streams etc). Finally, after months of development, it's fully completed. You shouldn't care about wide chars/strings/streams anymore when porting existing code to Android - just compile it using my NDK and go further. Download and enjoy!

 

有些ndk-build编译的时候,特别是编译c++文件的时候,如果链接的时候找不到某些符号,则可以将如下语句加入Android.mk:

LOCAL_ALLOW_UNDEFINED_SYMBOLS := true

根据ndk的doc,当ndk编译的时候会进行一个调试检查,见参考:

http://stackoverflow.com/questions/7209971/ndk-build-undefined-reference-to-errors-when-statically-linking-to-libxml-a

As explained in the ndk doc, it is because the ndk performs a debug checking even for avoiding runtime linking error and for some motivations it doesn't find the correct references in a pre-built library. Hope it coulds help.

 

另外,Application.mk也很重要,它里面应该这样:

APP_ABI := armeabi-v7a
APP_STL := gnustl_static
APP_CPPFLAGS += -frtti
APP_CPPFLAGS += -DANDROID

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值