Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Linker command error: arm-linux-androideabi/bin/ld: error: cannot find -llibc++.a with clang++
Forum Updated to NodeBB v4.3 + New Features

Linker command error: arm-linux-androideabi/bin/ld: error: cannot find -llibc++.a with clang++

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
6 Posts 6 Posters 2.7k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    daljit97
    wrote on 31 Jul 2018, 16:55 last edited by
    #1

    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)
    
    1 Reply Last reply
    0
    • B Offline
      B Offline
      biskero
      wrote on 6 Jul 2019, 18:58 last edited by
      #2

      where do I set -xplatform android-clang ? I am getting the same error and not sure where to configure this.

      thx

      J 1 Reply Last reply 8 Jul 2019, 07:01
      0
      • B biskero
        6 Jul 2019, 18:58

        where do I set -xplatform android-clang ? I am getting the same error and not sure where to configure this.

        thx

        J Offline
        J Offline
        jsulm
        Lifetime Qt Champion
        wrote on 8 Jul 2019, 07:01 last edited by
        #3

        @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

        https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply
        0
        • A Offline
          A Offline
          AlfredoC
          wrote on 22 Jul 2019, 20:16 last edited by
          #4

          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 error

          arm-linux-androideabi/bin/ld: error: cannot find -lc++ clang++
          

          any suggestions??

          1 Reply Last reply
          0
          • A Offline
            A Offline
            AlfredoC
            wrote on 27 Jul 2019, 12:45 last edited by
            #5

            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?

            A 1 Reply Last reply 27 Jul 2019, 19:14
            0
            • A AlfredoC
              27 Jul 2019, 12:45

              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?

              A Offline
              A Offline
              aha_1980
              Lifetime Qt Champion
              wrote on 27 Jul 2019, 19:14 last edited by
              #6

              @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

              Qt has to stay free or it will die.

              1 Reply Last reply
              1

              • Login

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Search
              • Get Qt Extensions
              • Unsolved