April 20, 2011

Naouali Naouali
Lab Rat
54 posts

cannot find -lQtMultimedia

 

Hi guys
I m trying to record my voice using Qt , but when i run the program i get this error: cannot find -lQtMultimedia .
How can i solve this issue.

Thanks in advance

12 replies

April 20, 2011

Vass Vass
Hobby Entomologist
738 posts

What do operation system you use? Version of Qt? And, please, show your .pro file.

 Signature 


Vasiliy

April 20, 2011

Naouali Naouali
Lab Rat
54 posts

Qt version :4.7.1 on linux system (ubuntu 10.10) this is the .pro file

  1. #-------------------------------------------------
  2. #
  3. # Project created by QtCreator 2011-04-20T10:11:14
  4. #
  5. #-------------------------------------------------
  6.  
  7. QT       += core
  8.  
  9. QT       -= gui
  10. QT       +=multimedia
  11.  
  12. TARGET = audiotest
  13. CONFIG   += console
  14. CONFIG   -= app_bundle
  15.  
  16. TEMPLATE = app
  17. target.path=/usr/local/bin
  18. INSTALLS=target
  19.  
  20. INCLUDEPATH +=/home/aladin/QtSDK/Desktop/Qt/473/gcc/include/QtMultimedia/
  21. INCLUDEPATH +=/home/aladin/QtSDK/Desktop/Qt/473/gcc/include/
  22. LIBS        +=/home/aladin/QtSDK/QtCreator/lib/qtcreator/libQtMultimedia.so
  23.  
  24.  
  25. SOURCES += main.cpp \
  26.     audio.cpp
  27.  
  28. HEADERS += \
  29.     audio.h

i added this lines :
1-QT +=multimedia
2-INCLUDEPATH +=/home/aladin/QtSDK/Desktop/Qt/473/gcc/include/QtMultimedia/
3-INCLUDEPATH +=/home/aladin/QtSDK/Desktop/Qt/473/gcc/include/
4-LIBS +=/home/aladin/QtSDK/QtCreator/lib/qtcreator/libQtMultimedia.so

after i commented line (1) and add .4 for the line (4) but this time i get a new error : /home/aladin/Projects/Qt/audiotest-build-desktop/audiotest: error while loading shared libraries: libQtMultimedia.so.4: cannot open shared object file: No such file or directory

April 20, 2011

Vass Vass
Hobby Entomologist
738 posts

INCLUDEPATH +=/home/aladin/QtSDK/Desktop/Qt/473/gcc/include/QtMultimedia/
INCLUDEPATH +=/home/aladin/QtSDK/Desktop/Qt/473/gcc/include/
LIBS +=/home/aladin/QtSDK/QtCreator/lib/qtcreator/libQtMultimedia.so

Not needed lines.

 Signature 


Vasiliy

April 20, 2011

Naouali Naouali
Lab Rat
54 posts

without line 2 and 3 i m not even to compile the program , and the compiler didn’t recognize QAudioInput and QAudioFormat

April 20, 2011

Smar Smar
Lab Rat
269 posts

Ubuntu doesn’t have qt-multimedia anymore.

April 20, 2011

Vass Vass
Hobby Entomologist
738 posts

Ok remove only this line:
LIBS +=/home/aladin/QtSDK/QtCreator/lib/qtcreator/libQtMultimedia.so

 Signature 


Vasiliy

April 20, 2011

Naouali Naouali
Lab Rat
54 posts
Smar wrote:
Ubuntu doesn’t have qt-multimedia anymore.

so what should i do ? is there a solution to install it in ubuntu 10.10 ?

April 20, 2011

Smar Smar
Lab Rat
269 posts

I have no idea why Ubuntu guys did that, but you can use qt-mobility’s qt-multimedia(it is the real multimedia package that will be in Qt 4.8 or so instead of that dummy one that’s in 4.6 and 4.7).

April 20, 2011

Naouali Naouali
Lab Rat
54 posts

I installed the qt-mobility and still get the same error or is there new class to use ?

April 20, 2011

Smar Smar
Lab Rat
269 posts

It is most likely in different package; you need to include it with QT += multimedia… Really, read its documentation, the forum is not substitute to doc. http://doc.qt.nokia.com/qtmobility-1.1/index.html

May 3, 2011

JohanC JohanC
Lab Rat
2 posts

I also got crazy with this error, and the documentation really didn’t help.
Combining serveral posts on other forums, and with trial and error, I needed following steps to get the multimedia compiling and running again under Ubuntu.
(In the .pro file)
QT += mobility multimediakit
CONFIG += mobility
MOBILITY = multimedia
… and also remove the QT += multimedia

May 3, 2011

JohanC JohanC
Lab Rat
2 posts

Oops. And also add

INCLUDEPATH += /usr/include/QtMobility
INCLUDEPATH += /usr/include/QtMultimediaKit

 
  ‹‹ designer      [solved] qmake: build a dll and its .lib for MSVC ››

You must log in to post a reply. Not a member yet? Register here!