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

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

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

georg...@trimble.com
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?

--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/android-ndk/3b41af9c-07b3-49a0-b5c0-7233d3fcca12n%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

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

georg...@trimble.com
Addendum: This is only a problem on armeabi-v7a builds, this does not occur with arm64-v8a builds.

On Wednesday, April 7, 2021 at 2:02:51 PM UTC+12 [hidden email] wrote:
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?

--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/android-ndk/df4220e5-16ea-4627-a609-5f06971aafd7n%40googlegroups.com.