开发者

Android NDK C++ 'wstring' support

I have source code/lib written in C++ - now i would like to compile and use the same in Android NDK project (NDK 6). I am able to compile most of the C++ files except "std::wstring" based functionality.

In Application.mk when i specify APP_STL: = stlport_static t开发者_JS百科hen it compiles std::wstring based code but when i specify APP_STL: = gnustl_static it fails to compile. I do not know how to resolve std::wstring related issue with APP_STL: = gnustl_static

Any pointer or help on this would be greatly appreciated.


A very similar question has already been asked: android-ndk gnustl_static exe not working consider looking at that question and testing to see if any of those answers work.


When I hit this exact problem, I saw the general disdain for wchar_t and decided to stop using it. So std::wstring became std::basic_string<uint_32>. I also had to rework some wide character string literals. It's not an ideal solution but it does address all future portability concerns.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜