Open bingsoo opened 7 years ago
Why you need to change to c++_static?
I don't know about bingsoo but I use c++_static instead of gnustl_static because it doesn't support some functions, like std::to_string
.
@minggo like @pyrosphere, I used c++_static to avoid some build errors on my project. I don't think this issue is major one since I can simply use gnustl_static instead but I created this issue to track or help someone who suffer debugging like me who set c++_static as APP_STL. If c++_static is not supported in android device, I think the cocos2d-x document should at least notice it.
We don't know if it is supported as we don't test it. So i can't say it is good or not as we don't have enough resources to test every situation.
I need to use this library to use some basic functions as codecvt.
@minggo google says "LLVM's libc++ is the C++ standard library that has been used by the Android OS since Lollipop, and in the future WILL BE THE ONLY STL available in the NDK." [https://developer.android.com/ndk/guides/cpp-support.html#libc]
Isn't it the time to start testing it? Supporting it? What if Google decides stop supporting it for good (as it predicted)?
google says "LLVM's libc++ is the C++ standard library that has been used by the Android OS since Lollipop, and in the future WILL BE THE ONLY STL available in the NDK."
I can not find the information in https://developer.android.com/ndk/guides/cpp-support.html#libc
. And the doc says libc++ is not stable.
@minggo The text I wrote is the very first phrase of the link I sent. How could you didn't find it? About not being stable, there must be a language barrier here, the doc says "Prior to NDK r16, the NDK's libc++ is not stable" - PRIOR TO r16 - in other words: in older versions
Not paying attention to this is going to cause the same thing that happened when google removed the "android" command and the projects stopped compiling. Do you remember?
The good news are that I could make everything works great on the c++_static lib. There are only a million warnings but nothing bad.
check this link: https://android.googlesource.com/platform/ndk/+/master/docs/Roadmap.md#ndk-r18 it clearly says the libc++ will be the only STL available after the first quarter of 2018. We've got 5 months.
Thanks for the link. The page is automatically translated to Chinese when i open the link, it is cookie related, i will fix it the check the English version.
cocos2d-x doesn't use libc++ is because we changed it in v3.11 or other version, i don't remembered, and meet some strange crash issues. That's why i don't want to change to use libc++ until it is stable.
Well, in April 2018 the libc++ will be the only option... Let me know if you need me to help on this.
Thanks, i think you can help to report issues or sent PR to fix issues that are libc++ related.
Just got my first major error related to the libc++_static.
I updated the gradle to the version 4.1 and from now on I am getting the following error:
Error:(506, 63) error: incomplete type 'std::__ndk1::is_move_assignable
The error is triggered when the compiler is compiling the file "cocos/./base/CCConsole.cpp:318:28". If I totally remove dependencies on the codecvt and compile the project using the gnustl_static, everything works great.
Other apps I have that don't necessarily need to use the libc++_static (they use gnustl_static) work great on gradle 4.1.
Check this also https://github.com/cocos2d/cocos2d-x/pull/18470
@KAMIKAZEUA That is great! anyways, this won't resolve this specific issue.
Steps to Reproduce:
game will jitter every 4 seconds.