error: cannot find -lc++ qt 5.12 android
-
The error: cannot find -lc++ using ndk r20 can be solved like this:
https://codereview.qt-project.org/c/qt/qtbase/+/264903/9/mkspecs/android-clang/qmake.conf#34For example to compile for android armv7 ndk r20, locate the file:
C:\Qt\5.13.0\android_armv7\mkspecs\android-clang\qmake.conf
and add the missing-nostdlib++
for android x86 (i use this for emulator), locate the file:
C:\Qt\5.13.0\android_x86\mkspecs\android-clang\qmake.conf
wrote on 27 Jun 2019, 07:36 last edited by@Albertino solution Works!!! :) Thank you.
-
wrote on 27 Jun 2019, 22:13 last edited by
@Albertino solution works for me (Qt 5.12.3)
-
The error: cannot find -lc++ using ndk r20 can be solved like this:
https://codereview.qt-project.org/c/qt/qtbase/+/264903/9/mkspecs/android-clang/qmake.conf#34For example to compile for android armv7 ndk r20, locate the file:
C:\Qt\5.13.0\android_armv7\mkspecs\android-clang\qmake.conf
and add the missing-nostdlib++
for android x86 (i use this for emulator), locate the file:
C:\Qt\5.13.0\android_x86\mkspecs\android-clang\qmake.conf
wrote on 14 Jul 2019, 17:24 last edited by@Albertino thank you Sir, you just saved my day (night to be honest).
-
wrote on 19 Jul 2019, 06:59 last edited by aha_1980
@Albertino @AriosJentu Hello , I am getting while deploying 5.10 project into QT 5.13. It is perfectly deploying for windows but for android unable to deploy i have already tried all available solutions but nothing is working out for me.
This is my error-
clang++.exe: error: no such file or directory: 'c:\Utils\Android\android-ndk-r19c/sources/cxx-stl/llvm-libc++/libs/arm64-v8a/libc++.so.21'
make: *** [libMNSBLauncher.so] Error 1
12:26:15: The process "C:\Android\android-ndk-r19c\prebuilt\windows-x86_64\bin\make.exe" exited with code 2.
Error while building/deploying project mobilauncher (kit: Android for arm64-v8a (Clang Qt 5.13.0 for Android ARM64-v8a))
When executing step "Make" 😢 -
The error: cannot find -lc++ using ndk r20 can be solved like this:
https://codereview.qt-project.org/c/qt/qtbase/+/264903/9/mkspecs/android-clang/qmake.conf#34For example to compile for android armv7 ndk r20, locate the file:
C:\Qt\5.13.0\android_armv7\mkspecs\android-clang\qmake.conf
and add the missing-nostdlib++
for android x86 (i use this for emulator), locate the file:
C:\Qt\5.13.0\android_x86\mkspecs\android-clang\qmake.conf
wrote on 19 Jul 2019, 13:18 last edited by@Albertino thank you!
-
wrote on 24 Jul 2019, 11:30 last edited by
You also can write this into your own qmake file, not into system one. To be precise, just add into your project's .pro the following:
QMAKE_LINK += -nostdlib++
and that's it
-
You also can write this into your own qmake file, not into system one. To be precise, just add into your project's .pro the following:
QMAKE_LINK += -nostdlib++
and that's it
wrote on 26 Jul 2019, 09:46 last edited byThis post is deleted! -
You also can write this into your own qmake file, not into system one. To be precise, just add into your project's .pro the following:
QMAKE_LINK += -nostdlib++
and that's it
wrote on 26 Jul 2019, 09:47 last edited by@trousev said in error: cannot find -lc++ qt 5.12 android:
QMAKE_LINK += -nostdlib++
Oh nice to know, thanks
-
The error: cannot find -lc++ using ndk r20 can be solved like this:
https://codereview.qt-project.org/c/qt/qtbase/+/264903/9/mkspecs/android-clang/qmake.conf#34For example to compile for android armv7 ndk r20, locate the file:
C:\Qt\5.13.0\android_armv7\mkspecs\android-clang\qmake.conf
and add the missing-nostdlib++
for android x86 (i use this for emulator), locate the file:
C:\Qt\5.13.0\android_x86\mkspecs\android-clang\qmake.conf
wrote on 2 Aug 2019, 10:26 last edited by@albertino THANK YOU! WOOORKS!!!!
-
You also can write this into your own qmake file, not into system one. To be precise, just add into your project's .pro the following:
QMAKE_LINK += -nostdlib++
and that's it
-
wrote on 23 Aug 2019, 12:51 last edited by
@albertino said in error: cannot find -lc++ qt 5.12 android:
https://codereview.qt-project.org/c/qt/qtbase/+/264903/9/mkspecs/android-clang/qmake.conf#34
Solution works on 5.12.4
-
wrote on 27 Aug 2019, 19:44 last edited by
@rickf I'd like to know the same thing. Is this just a workaround or the correct setup?
-
You also can write this into your own qmake file, not into system one. To be precise, just add into your project's .pro the following:
QMAKE_LINK += -nostdlib++
and that's it
wrote on 28 Aug 2019, 13:59 last edited by@trousev said in error: cannot find -lc++ qt 5.12 android:
You also can write this into your own qmake file, not into system one. To be precise, just add into your project's .pro the following:
QMAKE_LINK += -nostdlib++
and that's it
Worked for me!
-
wrote on 4 Sept 2019, 12:07 last edited by
FYI If this is https://bugreports.qt.io/browse/QTBUG-70631, it's claimed to be fixed with 5.12.5 and 5.13.0
-
wrote on 1 Oct 2019, 07:57 last edited by Gourmet 10 Jan 2019, 08:51
Just installed Qt 5.12.5 and checked - this option is already in qmake.config files for all android branches.
Topic starter can change this topic to SOLVED.
-
The error: cannot find -lc++ using ndk r20 can be solved like this:
https://codereview.qt-project.org/c/qt/qtbase/+/264903/9/mkspecs/android-clang/qmake.conf#34For example to compile for android armv7 ndk r20, locate the file:
C:\Qt\5.13.0\android_armv7\mkspecs\android-clang\qmake.conf
and add the missing-nostdlib++
for android x86 (i use this for emulator), locate the file:
C:\Qt\5.13.0\android_x86\mkspecs\android-clang\qmake.conf
wrote on 21 Oct 2019, 05:45 last edited by@Albertino thanks it worked
-
Have almost the same trouble. After some system updates (Manjaro), it won't run on my any android devices. Crashing with error that cannot found linker -lc++
02:46:40: Running steps for project Calendar... 02:46:40: Configuration unchanged, skipping qmake step. 02:46:40: Starting: "/opt/android-ndk/prebuilt/linux-x86_64/bin/make" -j4 /opt/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++ -D__ANDROID_API__=22 -target aarch64-none-linux-android -gcc-toolchain /opt/android-ndk/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64 -fno-limit-debug-info -Wl,--exclude-libs,libgcc.a -Wl,--exclude-libs,libatomic.a --sysroot=/opt/android-ndk/platforms/android-22/arch-arm64/ -Wl,-soname,libCalendar.so -Wl,-rpath=/opt/android-libs/aarch64/lib -Wl,--no-undefined -Wl,-z,noexecstack -shared -o libCalendar.so event.o eventmodel.o main.o qrc_resources.o moc_event.o moc_eventmodel.o -L/opt/android-libs/aarch64/lib -lQt5Quick -L/opt/android-ndk/sources/cxx-stl/llvm-libc++/libs/arm64-v8a -lQt5Gui -lQt5Qml -lQt5Network -lQt5Sql -lQt5Core /opt/android-ndk/platforms/android-22/arch-arm64/usr/lib/libGLESv2.so -L/opt/android-ndk/sources/cxx-stl/llvm-libc++/libs/arm64-v8a /opt/android-ndk/sources/cxx-stl/llvm-libc++/libs/arm64-v8a/libc++.so.22 -llog -lz -lm -ldl -lc /opt/android-ndk/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/lib/gcc/aarch64-linux-android/4.9.x/../../../../aarch64-linux-android/bin/ld: cannot find -lc++ clang++: error: linker command failed with exit code 1 (use -v to see invocation) make: *** [libCalendar.so] Error 1 02:46:40: The process "/opt/android-ndk/prebuilt/linux-x86_64/bin/make" exited with code 2. Error while building/deploying project Calendar (kit: Android) When executing step "Make" 02:46:40: Elapsed time: 00:00.
SDK is 26.1.1, NDK is 20.0.5594570.
wrote on 17 Nov 2020, 07:21 last edited by@AriosJentu I had the same problem, how did you solve it