How to add lame library to Qt Adroid application
fpartl last edited by
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.
fpartl last edited by fpartl
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?
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...
You should search for
liblame android, there are several projects that proposes to build that library for Android.
fpartl last edited by
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.
@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.