Planned maintenance has been done but it did not solve the problem. So work will continue on this and a new time for trying updates will be announced asap.

error: cannot find -lc++ | error during compilation on android



  • Hello,
    I have a problem with app on android. I follow by these steps to create program on my android but on finish compilation I get errors from QtCreator.
    1)First I set up Java/Android SDK/Android NDK
    0_1561481525643_androidSettings.png
    2) Second I use compilator
    0_1561481792247_compilatorError.png
    3)Next I choose my device. My tablet with Android has turn on programming mode.
    0_1561482108699_chooseDevice.png
    4)Last I get error from QtCreator
    0_1561482520598_outputError.png
    This is compilator output communications

    Initializing deployment to Android device/simulator
    Deploying to 3300c07a1b4c5539
    21:36:55: Uruchamianie kroków budowania dla projektu nienazwany40...
    21:36:55: Uruchamianie "C:\Qt1\5.13.0\android_armv7\bin\qmake.exe" C:\FolderQt\nienazwany40\nienazwany40.pro -spec android-clang "CONFIG+=qtquickcompiler"
    Info: creating stash file C:\FolderQt\build-nienazwany40-Android_for_armeabi_v7a_Clang_Qt_5_13_0_for_Android_ARMv7-Release\.qmake.stash
    21:36:58: Proces "C:\Qt1\5.13.0\android_armv7\bin\qmake.exe" zakończył się normalnie.
    21:36:58: Uruchamianie "C:\Android\android-ndk-r20\prebuilt\windows\bin\make.exe" -f C:/FolderQt/build-nienazwany40-Android_for_armeabi_v7a_Clang_Qt_5_13_0_for_Android_ARMv7-Release/Makefile qmake_all
    make: Nothing to be done for `qmake_all'.
    21:36:58: Proces "C:\Android\android-ndk-r20\prebuilt\windows\bin\make.exe" zakończył się normalnie.
    21:36:58: Uruchamianie "C:\Android\android-ndk-r20\prebuilt\windows\bin\make.exe" -j4
    C:\Android\android-ndk-r20/toolchains/llvm/prebuilt/windows/bin/clang++ -c -D__ANDROID_API__=21 -target armv7-none-linux-androideabi -gcc-toolchain C:\Android\android-ndk-r20/toolchains/arm-linux-androideabi-4.9/prebuilt/windows -fno-limit-debug-info -DANDROID_HAS_WSTRING --sysroot=C:\Android\android-ndk-r20/sysroot -isystem C:\Android\android-ndk-r20/sysroot/usr/include/arm-linux-androideabi -isystem C:\Android\android-ndk-r20/sources/cxx-stl/llvm-libc++/include -isystem C:\Android\android-ndk-r20/sources/android/support/include -isystem C:\Android\android-ndk-r20/sources/cxx-stl/llvm-libc++abi/include -fstack-protector-strong -DANDROID -march=armv7-a -mfloat-abi=softfp -mfpu=vfp -fno-builtin-memmove -mthumb -Oz -std=gnu++11 -Wall -W -D_REENTRANT -fPIC -DQT_DEPRECATED_WARNINGS -DQT_NO_DEBUG -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I..\nienazwany40 -I. -I..\..\Qt1\5.13.0\android_armv7\include -I..\..\Qt1\5.13.0\android_armv7\include\QtQuick -I..\..\Qt1\5.13.0\android_armv7\include\QtGui -I..\..\Qt1\5.13.0\android_armv7\include\QtQml -I..\..\Qt1\5.13.0\android_armv7\include\QtNetwork -I..\..\Qt1\5.13.0\android_armv7\include\QtCore -I. -I..\..\Qt1\5.13.0\android_armv7\mkspecs\android-clang -o main.obj ..\nienazwany40\main.cpp
    C:\Qt1\5.13.0\android_armv7\bin\qmlcachegen.exe --resource=C:/FolderQt/nienazwany40/qml.qrc -o main_qml.cpp ..\nienazwany40\main.qml
    C:\Qt1\5.13.0\android_armv7\bin\qmlcachegen.exe --resource-file-mapping=C:/FolderQt/nienazwany40/qml.qrc -o qmlcache_loader.cpp ..\nienazwany40\qml.qrc
    C:\Android\android-ndk-r20/toolchains/llvm/prebuilt/windows/bin/clang++ -c -D__ANDROID_API__=21 -target armv7-none-linux-androideabi -gcc-toolchain C:\Android\android-ndk-r20/toolchains/arm-linux-androideabi-4.9/prebuilt/windows -fno-limit-debug-info -DANDROID_HAS_WSTRING --sysroot=C:\Android\android-ndk-r20/sysroot -isystem C:\Android\android-ndk-r20/sysroot/usr/include/arm-linux-androideabi -isystem C:\Android\android-ndk-r20/sources/cxx-stl/llvm-libc++/include -isystem C:\Android\android-ndk-r20/sources/android/support/include -isystem C:\Android\android-ndk-r20/sources/cxx-stl/llvm-libc++abi/include -fstack-protector-strong -DANDROID -march=armv7-a -mfloat-abi=softfp -mfpu=vfp -fno-builtin-memmove -mthumb -Oz -std=gnu++11 -Wall -W -D_REENTRANT -fPIC -DQT_DEPRECATED_WARNINGS -DQT_NO_DEBUG -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I..\nienazwany40 -I. -I..\..\Qt1\5.13.0\android_armv7\include -I..\..\Qt1\5.13.0\android_armv7\include\QtQuick -I..\..\Qt1\5.13.0\android_armv7\include\QtGui -I..\..\Qt1\5.13.0\android_armv7\include\QtQml -I..\..\Qt1\5.13.0\android_armv7\include\QtNetwork -I..\..\Qt1\5.13.0\android_armv7\include\QtCore -I. -I..\..\Qt1\5.13.0\android_armv7\mkspecs\android-clang -o main_qml.obj main_qml.cpp
    C:\Android\android-ndk-r20/toolchains/llvm/prebuilt/windows/bin/clang++ -c -D__ANDROID_API__=21 -target armv7-none-linux-androideabi -gcc-toolchain C:\Android\android-ndk-r20/toolchains/arm-linux-androideabi-4.9/prebuilt/windows -fno-limit-debug-info -DANDROID_HAS_WSTRING --sysroot=C:\Android\android-ndk-r20/sysroot -isystem C:\Android\android-ndk-r20/sysroot/usr/include/arm-linux-androideabi -isystem C:\Android\android-ndk-r20/sources/cxx-stl/llvm-libc++/include -isystem C:\Android\android-ndk-r20/sources/android/support/include -isystem C:\Android\android-ndk-r20/sources/cxx-stl/llvm-libc++abi/include -fstack-protector-strong -DANDROID -march=armv7-a -mfloat-abi=softfp -mfpu=vfp -fno-builtin-memmove -mthumb -Oz -std=gnu++11 -Wall -W -D_REENTRANT -fPIC -DQT_DEPRECATED_WARNINGS -DQT_NO_DEBUG -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I..\nienazwany40 -I. -I..\..\Qt1\5.13.0\android_armv7\include -I..\..\Qt1\5.13.0\android_armv7\include\QtQuick -I..\..\Qt1\5.13.0\android_armv7\include\QtGui -I..\..\Qt1\5.13.0\android_armv7\include\QtQml -I..\..\Qt1\5.13.0\android_armv7\include\QtNetwork -I..\..\Qt1\5.13.0\android_armv7\include\QtCore -I. -I..\..\Qt1\5.13.0\android_armv7\mkspecs\android-clang -o qmlcache_loader.obj qmlcache_loader.cpp
    C:\Android\android-ndk-r20/toolchains/llvm/prebuilt/windows/bin/clang++ -D__ANDROID_API__=21 -target armv7-none-linux-androideabi -gcc-toolchain C:\Android\android-ndk-r20/toolchains/arm-linux-androideabi-4.9/prebuilt/windows -fno-limit-debug-info -Wl,--exclude-libs,libgcc.a -Wl,--exclude-libs,libatomic.a -Wl,--exclude-libs,libunwind.a --sysroot=C:\Android\android-ndk-r20/platforms/android-21/arch-arm/ -Wl,-soname,libnienazwany40.so -Wl,-rpath=C:/Qt1/5.13.0/android_armv7/lib -Wl,--no-undefined -Wl,-z,noexecstack -shared -o libnienazwany40.so main.obj main_qml.obj qmlcache_loader.obj   C:/Qt1/5.13.0/android_armv7/lib/libQt5Quick.so -Lc:\Utils\Android\android-ndk-r19c/sources/cxx-stl/llvm-libc++/libs/armeabi-v7a C:/Qt1/5.13.0/android_armv7/lib/libQt5Gui.so C:/Qt1/5.13.0/android_armv7/lib/libQt5Qml.so C:/Qt1/5.13.0/android_armv7/lib/libQt5Network.so C:/Qt1/5.13.0/android_armv7/lib/libQt5Core.so -lGLESv2  -LC:\Android\android-ndk-r20/sources/cxx-stl/llvm-libc++/libs/armeabi-v7a C:\Android\android-ndk-r20/sources/cxx-stl/llvm-libc++/libs/armeabi-v7a/libc++.so.21 -llog -lz -lm -ldl -lc
    C:\Android\android-ndk-r20/toolchains/arm-linux-androideabi-4.9/prebuilt/windows/lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin\ld: error: cannot find -lc++
    clang++: error: linker command failed with exit code 1 (use -v to see invocation)
    make: *** [libnienazwany40.so] Error 1
    21:37:04: Proces "C:\Android\android-ndk-r20\prebuilt\windows\bin\make.exe" zakończył się kodem wyjściowym 2.
    Błąd budowania / instalowania projektu nienazwany40 (zestaw narzędzi: Android for armeabi-v7a (Clang Qt 5.13.0 for Android ARMv7))
    Podczas wykonywania kroku "Make"
    21:37:04: Czas trwania: 00:09.
    

    Thanks for all suggestion how solve that,
    Greetings



  • Hello. Yesterday I tried to build test project for Android and faced the same problem.





  • @levolex Thank you for link. Now, It works.


Log in to reply