PDA

View Full Version : Unable to compile example for QtAudio



rikkimongoose
12th March 2013, 21:56
I'm using Qt Creator under Ubuntu. I'm trying to compile the default example for QAudioInput.

There aren't any QtMultimedia in Ubuntu :(. I've installed QtMobile instead of it and changed the *.pro file this way:

I've removed reference to QtMultimedia and added the following lines:

QMAKE_CXXFLAGS += -std=c++11

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

Also I've changed link in the header file from:


#include <qaudioinput.h>

To:


#include <QtMultimediaKit/qaudioinput.h>

This file exists and contains the multimedia declarations.

But when I'm trying to compile it, it can't find any of declarations for QtAudio functions. It returns a lot of errors like this:

- Undefined reference to `QAudioFormat::QAudioFormat(QAudioFormat const&)'

Is there any way to compile it under Ubuntu??

P.s.:

I've tried to ask this question on their official forum, but it's impossible to register on it now :(

ChrisW67
13th March 2013, 02:34
You need to make sure the library path and libraries are listed appropriately in LIBS. This is, from memory, done for you if you use the:


CONFIG += mobility

in your project file.