Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. udefined reference to external lib
Forum Updated to NodeBB v4.3 + New Features

udefined reference to external lib

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
9 Posts 4 Posters 614 Views
  • 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.
  • 0xNull0 Offline
    0xNull0 Offline
    0xNull
    wrote on last edited by
    #1

    Hi im trying to use an external lib / api on my current project (imbe_vocoder)...

    some information before:

    OS: Ubuntu / Linux
    KIT: Android QT 5.15.2 CLang multi-abi
    (all QT packages / SDK / NDK / ETC... already installed correctly )

    ae609d25-1655-4877-abae-3c1371d517a7-image.png

    imbe_vocoder is already compiled for aarch64 / android.

    0030ab8f-c39c-494e-a7f3-099299b9f2c8-image.png

    trying to compile to my current kit show me the next error:

    951757b6-e27e-46ef-b9a2-8bf5b0f1261e-image.png

    anyone know why? i already try changing compiler options from multi-abi to specific aarch64 but doesn't work... and i haven't any idea of how to fix that.

    JonBJ 1 Reply Last reply
    0
    • Christian EhrlicherC Online
      Christian EhrlicherC Online
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Your LIBS parameter doesn't look right

      • you're missing the lib path
      • it's not -L but -l

      as properly described in the documentation.

      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
      Visit the Qt Academy at https://academy.qt.io/catalog

      1 Reply Last reply
      1
      • 0xNull0 0xNull

        Hi im trying to use an external lib / api on my current project (imbe_vocoder)...

        some information before:

        OS: Ubuntu / Linux
        KIT: Android QT 5.15.2 CLang multi-abi
        (all QT packages / SDK / NDK / ETC... already installed correctly )

        ae609d25-1655-4877-abae-3c1371d517a7-image.png

        imbe_vocoder is already compiled for aarch64 / android.

        0030ab8f-c39c-494e-a7f3-099299b9f2c8-image.png

        trying to compile to my current kit show me the next error:

        951757b6-e27e-46ef-b9a2-8bf5b0f1261e-image.png

        anyone know why? i already try changing compiler options from multi-abi to specific aarch64 but doesn't work... and i haven't any idea of how to fix that.

        JonBJ Online
        JonBJ Online
        JonB
        wrote on last edited by JonB
        #3

        @0xNull
        I don't think it has anything to do with architecture. It looks like you have not told it which library file to link with to resolve the references.

        LIBS += -Limbe_vocder

        Are you aware that the -L argument tells the linker to look in the specified directory for lib files? It is the -l argument which specifies a library file. (They can both be used if required.) Did you maybe intend -limbe_vocder?

        1 Reply Last reply
        1
        • 0xNull0 Offline
          0xNull0 Offline
          0xNull
          wrote on last edited by 0xNull
          #4

          This happend when change -L to -l

          3acb0d81-a45a-42b9-90fe-b77ba2812d7f-image.png

          inside project folder

          1c6cb612-ecba-4ec5-b925-74525d3851f4-image.png

          JonBJ 1 Reply Last reply
          0
          • 0xNull0 0xNull

            This happend when change -L to -l

            3acb0d81-a45a-42b9-90fe-b77ba2812d7f-image.png

            inside project folder

            1c6cb612-ecba-4ec5-b925-74525d3851f4-image.png

            JonBJ Online
            JonBJ Online
            JonB
            wrote on last edited by
            #5

            @0xNull
            Look at the filename of the .a file and the error message. You say it is imbe_vocoder. So far as I can see it's mbe_vocoder, in libmbe_vocoder.a.

            0xNull0 1 Reply Last reply
            0
            • JonBJ JonB

              @0xNull
              Look at the filename of the .a file and the error message. You say it is imbe_vocoder. So far as I can see it's mbe_vocoder, in libmbe_vocoder.a.

              0xNull0 Offline
              0xNull0 Offline
              0xNull
              wrote on last edited by
              #6

              @JonB nope.. doesn't work

              10161c19-d38f-4d45-b5f5-0fdeff0417f4-image.png

              JonBJ 1 Reply Last reply
              0
              • 0xNull0 0xNull

                @JonB nope.. doesn't work

                10161c19-d38f-4d45-b5f5-0fdeff0417f4-image.png

                JonBJ Online
                JonBJ Online
                JonB
                wrote on last edited by JonB
                #7

                @0xNull
                And does your linker look in whatever directory that is? Do you need to add that directory with a -L argument?

                Does the package come with any instructions for its usage?

                0xNull0 1 Reply Last reply
                0
                • JonBJ JonB

                  @0xNull
                  And does your linker look in whatever directory that is? Do you need to add that directory with a -L argument?

                  Does the package come with any instructions for its usage?

                  0xNull0 Offline
                  0xNull0 Offline
                  0xNull
                  wrote on last edited by
                  #8

                  @JonB said in udefined reference to external lib:

                  Does the package come with any instructions for its usage?

                  yes i'll share the git repos with you, and try compile.

                  app
                  https://github.com/nostar/DroidStar

                  vocoder (pre-requisite)
                  https://github.com/nostar/imbe_vocoder

                  ok.. i'll explain you how to build the APK... first compile the vocoder following the README file, after all put the generated files on project folder then on QT Creator import the project and build in android kit 5.15.2 clang multi-abi. Try

                  jsulmJ 1 Reply Last reply
                  0
                  • 0xNull0 0xNull

                    @JonB said in udefined reference to external lib:

                    Does the package come with any instructions for its usage?

                    yes i'll share the git repos with you, and try compile.

                    app
                    https://github.com/nostar/DroidStar

                    vocoder (pre-requisite)
                    https://github.com/nostar/imbe_vocoder

                    ok.. i'll explain you how to build the APK... first compile the vocoder following the README file, after all put the generated files on project folder then on QT Creator import the project and build in android kit 5.15.2 clang multi-abi. Try

                    jsulmJ Online
                    jsulmJ Online
                    jsulm
                    Lifetime Qt Champion
                    wrote on last edited by
                    #9

                    @0xNull Could you please tell the linker where to look for the lib using -L as already suggested here several times?

                    LIBS += -LFOLDER_WHERE_IMBE_VOCODER_LIB_IS -limbe_vocoder
                    

                    And please post text instead of pictures.

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

                    1 Reply Last reply
                    3

                    • Login

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