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. How to add lame library to Qt Adroid application

How to add lame library to Qt Adroid application

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
7 Posts 3 Posters 1.8k 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.
  • F Offline
    F Offline
    fpartl
    wrote on last edited by
    #1

    Hello,

    I am trying to use Lame 3.100 library to convert raw pcm data to mp3 file. But every time I am building my project comes error

    undefined reference to 'lame_init'
    undefined reference to 'lame_set_in_samplerate'
    ...
    undefined reference to 'lame_close'
    

    With lame library installed on my linux machine and this line .pro file. I am able to run it.

    LIBS += -lmp3lame
    

    But when I switch to Adroid build it fails. So I downloaded whole lame source files from sourceforge.com and add this text to .pro file.

    INCLUDEPATH += lame-3.100/include
    LIBS += -L"lame-3.100/libmp3lame" -lmp3lame
    

    But it still not working in Android build (working on Desktop). Please help.

    1 Reply Last reply
    0
    • Pablo J. RoginaP Offline
      Pablo J. RoginaP Offline
      Pablo J. Rogina
      wrote on last edited by
      #2

      @fpartl two things here: you need Lame library compiled for Android, and then you need to provide a proper folder structure in your Qt project, see for instance this post.

      Upvote the answer(s) that helped you solve the issue
      Use "Topic Tools" button to mark your post as Solved
      Add screenshots via postimage.org
      Don't ask support requests via chat/PM. Please use the forum so others can benefit from the solution in the future

      1 Reply Last reply
      1
      • F Offline
        F Offline
        fpartl
        wrote on last edited by fpartl
        #3

        Thank you for reply.
        Why cant I compile downloaded source files using Qt Creator? Sorry, I am completely new to this "Android stuff".
        I found this tutorial to create an library. I this the right way to do it? And than you your post with /android/... path?

        1 Reply Last reply
        0
        • Pablo J. RoginaP Offline
          Pablo J. RoginaP Offline
          Pablo J. Rogina
          wrote on last edited by
          #4

          @fpartl said in How to add lame library to Qt Adroid application:

          Why cant I compile downloaded source files using Qt Creator?

          what sources? the Lame library? what's the error?
          I'm afraid I cannot help with specifics about Lame and Android, but think that Qt Creator might not be the right tool every time, so perhaps a terminal and command line could be best to get the library built and then copy it into your Qt's project folder(s)

          I found this tutorial to create an library. I this the right way to do it?

          I don't know, but you may want to go and try. Sometimes it's the best approach. If you succeed, you'll know the path was worth it. If not...

          Upvote the answer(s) that helped you solve the issue
          Use "Topic Tools" button to mark your post as Solved
          Add screenshots via postimage.org
          Don't ask support requests via chat/PM. Please use the forum so others can benefit from the solution in the future

          1 Reply Last reply
          0
          • SGaistS Offline
            SGaistS Offline
            SGaist
            Lifetime Qt Champion
            wrote on last edited by
            #5

            Hi,

            You should search for liblame android, there are several projects that proposes to build that library for Android.

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            1 Reply Last reply
            0
            • F Offline
              F Offline
              fpartl
              wrote on last edited by
              #6

              Finally I created libmp3lame.so file, but I dont know how to add it to my project. I tried to add library using Project > Add Library > External, but there are only options for Windows, Macintosh and Linux.

              1 Reply Last reply
              0
              • Pablo J. RoginaP Offline
                Pablo J. RoginaP Offline
                Pablo J. Rogina
                wrote on last edited by
                #7

                @fpartl have you read the post I suggested? I guess it clearly states what folder structure to create under your project root folder, and once you have that just simply copy the .so file under the proper location.

                Upvote the answer(s) that helped you solve the issue
                Use "Topic Tools" button to mark your post as Solved
                Add screenshots via postimage.org
                Don't ask support requests via chat/PM. Please use the forum so others can benefit from the solution in the future

                1 Reply Last reply
                0

                • Login

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