Results 1 to 2 of 2

Thread: Unable to compile example for QtAudio

  1. #1
    Join Date
    Mar 2013
    Qt products

    Default Unable to compile example for QtAudio

    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>


    #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??


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

  2. #2
    Join Date
    Mar 2009
    Brisbane, Australia
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Unix/X11 Windows
    Wiki edits

    Default Re: Unable to compile example for QtAudio

    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:
    Qt Code:
    1. CONFIG += mobility
    To copy to clipboard, switch view to plain text mode 
    in your project file.

Similar Threads

  1. Unable to compile QserialDevice
    By kulsekarr in forum Newbie
    Replies: 1
    Last Post: 20th September 2012, 17:50
  2. Unable to compile project
    By vlad230 in forum Newbie
    Replies: 2
    Last Post: 16th June 2012, 14:08
  3. Unable to Compile qextserialport on max os 10.6
    By KenJustKen in forum Qt Programming
    Replies: 1
    Last Post: 16th March 2012, 20:22
  4. Unable to compile an Example
    By learner in forum Newbie
    Replies: 11
    Last Post: 15th November 2010, 15:27
  5. fftw unable to compile
    By superutsav in forum General Programming
    Replies: 7
    Last Post: 24th January 2006, 14:10

Tags for this Thread


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.