Getting undefined reference to 'std::__ndk1::__itoa::__u32toa(unsigned int, char*)' compiling armeabi-v7a

31 views
Skip to first unread message

georg...@trimble.com

unread,
Apr 6, 2021, 10:02:51 PM4/6/21
to android-ndk
I am compiling a dynamic library for Android using Visual Studio's NDK toolchain. When I set the platform to ARM and STL to "C++_shared", I get undefined reference to 'std::__ndk1::__itoa::__u32toa(unsigned int, char*)'. This only happens with "c++_shared" STL. It does not happen with the "c++_static" STL. My target API level 23 (I've also tested 29, the result is the same).

This linkage error comes from my usage of std::to_chars() which is a "charconv". My question is why is this happening only for "c++_shared" but not "c++_static". Is it just because it's not implemented in the shared STL but is for the static?

georg...@trimble.com

unread,
Apr 8, 2021, 2:02:07 AM4/8/21
to android-ndk
Addendum: This is only a problem on armeabi-v7a builds, this does not occur with arm64-v8a builds.
Reply all
Reply to author
Forward
0 new messages