You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to get the std module to work on Android.
Here is some progress I have made:
I compiled the libc++ from llvm-project using ndk toolchain, and it does build without issues. But when I try to use it according to https://libcxx.llvm.org/Modules.html#using-the-local-build, I got lots of errors like
[build] In file included from <path to build dir>/_deps/std-src/std.cppm:249:
[build] <path to build dir>/_deps/std-src/std/cstdio.inc:48:14: error: using declaration referring to 'sprintf' with internal linkage cannot be exported
[build] 48 | using std::sprintf _LIBCPP_USING_IF_EXISTS;
[build] | ^
[build] <path to android sdk>/ndk/28.0.12916984/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/include/bits/fortify/stdio.h:59:5: note: target of using declaration
[build] 59 | int sprintf(char* __BIONIC_COMPLICATED_NULLNESS dest, const char* _Nonnull format)
[build] | ^
It is due to the NDK using internal linkage inside c headers. In MinGW, they are defined as declarations instead of implementations.
Is there a way to get rid of this?
The text was updated successfully, but these errors were encountered:
Description
I am trying to get the std module to work on Android.
Here is some progress I have made:
I compiled the libc++ from llvm-project using ndk toolchain, and it does build without issues. But when I try to use it according to https://libcxx.llvm.org/Modules.html#using-the-local-build, I got lots of errors like
It is due to the NDK using internal linkage inside c headers. In MinGW, they are defined as declarations instead of implementations.
Is there a way to get rid of this?
The text was updated successfully, but these errors were encountered: