Unsolved Linker command error: arm-linux-androideabi/bin/ld: error: cannot find -llibc++.a with clang++
-
So I built Qt from the sources using
-xplatform android-clang
so I could use clang instead of gcc for Android. The build was successful and I was able to correctly link Clang as a compiler in Qt Creator, however when I try to compile a project I get the following error:/home/user/Android/Sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: error: cannot find -llibc++.a clang++: error: linker command failed with exit code 1 (use -v to see invocation)
-
where do I set -xplatform android-clang ? I am getting the same error and not sure where to configure this.
thx
-
@biskero said in Linker command error: arm-linux-androideabi/bin/ld: error: cannot find -llibc++.a with clang++:
where do I set -xplatform android-clang ?
When calling configure
-
Hi,
I have the same problem using QtCreator 4.9.2 trying to compile with Qt 5.13.0
All paths were automatically detected and the IDE shows no errorarm-linux-androideabi/bin/ld: error: cannot find -lc++ clang++
any suggestions??
-
I found out that during Makefile processing the parameter -lc++ was added to the LIBS variable, like magic ;-)
This was done although the path to the correct libc++.so.21 was set.
So I could solve the problem with a symlink.
But I couldn't find out where this magic -lc++ parameter comes from, which was not defined in the Makefile nor in one of the NDK template files included.Any ideas?
-
@alfredoc That's a known problem, and the solution is provided here: https://forum.qt.io/topic/103713/error-cannot-find-lc-qt-5-12-android
Regards