Results 1 to 10 of 10

Thread: problem with phonon/music player example.

  1. #1
    Join Date
    Dec 2008
    Location
    My spaceship needs repairs..so, I am stuck on beautiful earth
    Posts
    98
    Thanks
    25
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Post problem with phonon/music player example.

    Hi,
    I was trying to run the 'musicplayer' example which uses phonon framework.I got a long list of errors(pasted below).I guess either phonon itself isn't present(though it's supposed to be bundled with Qt 4.4 and I am using Qt 4.4.3 on Linux (fedora) or maybe there's some other problem which you could help me in solving.
    I didn't make any changes in the code.

    Please advice on what to do?I am new to both Qt and Linux so please don't mind if my questions sound odd or too simple

    Thanks for any help.
    **********************************errors********** **************************
    In file included from main.cpp:22:
    mainwindow.h:25:37: error: phonon/phononnamespace.h: No such file or directory
    mainwindow.h:26:33: error: phonon/audiooutput.h: No such file or directory
    mainwindow.h:27:32: error: phonon/seekslider.h: No such file or directory
    mainwindow.h:28:33: error: phonon/mediaobject.h: No such file or directory
    mainwindow.h:29:34: error: phonon/volumeslider.h: No such file or directory
    mainwindow.h:30:41: error: phonon/backendcapabilities.h: No such file or directory
    mainwindow.h:52: error: ‘Phonon’ has not been declared
    mainwindow.h:52: error: expected ‘,’ or ‘...’ before ‘newState’
    mainwindow.h:54: error: expected ‘,’ or ‘...’ before ‘::’ token
    mainwindow.h:54: error: ISO C++ forbids declaration of ‘Phonon’ with no type
    mainwindow.h:55: error: ‘Phonon’ has not been declared
    mainwindow.h:55: error: expected ‘,’ or ‘...’ before ‘newState’
    mainwindow.h:64: error: ‘Phonon’ has not been declared
    mainwindow.h:64: error: ISO C++ forbids declaration of ‘SeekSlider’ with no type
    mainwindow.h:64: error: expected ‘;’ before ‘*’ token
    mainwindow.h:65: error: ‘Phonon’ has not been declared
    mainwindow.h:65: error: ISO C++ forbids declaration of ‘MediaObject’ with no type
    mainwindow.h:65: error: expected ‘;’ before ‘*’ token
    mainwindow.h:66: error: ‘Phonon’ has not been declared
    mainwindow.h:66: error: ISO C++ forbids declaration of ‘MediaObject’ with no type
    mainwindow.h:66: error: expected ‘;’ before ‘*’ token
    mainwindow.h:67: error: ‘Phonon’ has not been declared
    mainwindow.h:67: error: ISO C++ forbids declaration of ‘AudioOutput’ with no type
    mainwindow.h:67: error: expected ‘;’ before ‘*’ token
    mainwindow.h:68: error: ‘Phonon’ has not been declared
    mainwindow.h:68: error: ISO C++ forbids declaration of ‘VolumeSlider’ with no type
    mainwindow.h:68: error: expected ‘;’ before ‘*’ token
    mainwindow.h:69: error: ‘Phonon’ was not declared in this scope
    mainwindow.h:69: error: template argument 1 is invalid
    make: *** [main.o] Error 1

  2. #2
    Join Date
    Dec 2008
    Location
    My spaceship needs repairs..so, I am stuck on beautiful earth
    Posts
    98
    Thanks
    25
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default

    My gcc version is 4.1.2 20070925 (Red Hat 4.1.2-33).
    I guess it's not a compiler problem then as we need a minimum of 4.1.2 for phonon,right.Please let me know what I should do to get the music player working.
    Thanks.

  3. #3
    Join Date
    Dec 2008
    Location
    My spaceship needs repairs..so, I am stuck on beautiful earth
    Posts
    98
    Thanks
    25
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: problem with phonon/music player example.

    ***UPDATE****
    This is what I get when I traverse to /usr/local/Trolltech/Qt-4.4.3/include

    [root@localhost Qt-4.4.3]# cd include
    [root@localhost include]# ls
    Qt QtAssistant QtDesigner QtHelp QtOpenGL QtSql QtTest QtWebKit QtXmlPatterns
    Qt3Support QtCore QtGui QtNetwork QtScript QtSvg QtUiTools QtXml.

    Can't see phonon anywhere
    Please advice.
    Thanks in advance .

  4. #4
    Join Date
    Dec 2008
    Location
    My spaceship needs repairs..so, I am stuck on beautiful earth
    Posts
    98
    Thanks
    25
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: problem with phonon/music player example.

    Still awaiting help?please advice on how to proceed.I am stuck on the music player.

  5. #5
    Join Date
    Dec 2008
    Location
    Czech
    Posts
    44
    Thanks
    2
    Thanked 8 Times in 8 Posts
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Default Re: problem with phonon/music player example.

    Hi,
    did you put QT += phonon in your .pro file?

    radek

  6. #6
    Join Date
    Dec 2008
    Location
    Czech
    Posts
    44
    Thanks
    2
    Thanked 8 Times in 8 Posts
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Default Re: problem with phonon/music player example.

    also try to check if you have the phonon directory in /usr/include

    radek

  7. #7
    Join Date
    Dec 2008
    Location
    My spaceship needs repairs..so, I am stuck on beautiful earth
    Posts
    98
    Thanks
    25
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Post Re: problem with phonon/music player example.

    Hi,
    First of all,thanks for replying.
    Yes,the .pro file has QT +=phonon and no,I couldn't find 'phonon' anywhere in /usr/local/Trolltech/Qt-4.4.3.
    I got a reply from the qt-mailing list saying that Qt installation wasn't correct so phonon headers are missing.

    Is it possible to download 'phonon' package from somewhere and use it with the present Qt setup I got...without reinstalling Qt.
    Thanks for your time.

  8. #8
    Join Date
    Dec 2008
    Location
    Czech
    Posts
    44
    Thanks
    2
    Thanked 8 Times in 8 Posts
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Default Re: problem with phonon/music player example.

    Hi,
    I don't think, that you can download some package for phonon. But I am not sure.
    So I guess you should install it again. See the ./configure --help to check out how you can include phonon module. I think that it is included by default, but anyway do it just to be sure.
    I did it by myself and it started to work. But for some reason the phonon appeare in /user/include directory while Qt is in /usr/local/Trolltech directory.

    radek

  9. The following user says thank you to radek.z for this useful post:

    rishiraj (23rd January 2009)

  10. #9
    Join Date
    Dec 2008
    Location
    My spaceship needs repairs..so, I am stuck on beautiful earth
    Posts
    98
    Thanks
    25
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: problem with phonon/music player example.

    Hi,
    thanks for the suggestion.I guess I will have to reinstall it again.Also,I didn't know that phonon shows in the usr/include.I was searching for it in the Qt folder.Thanks for enlightening me on that one.

  11. #10
    Join Date
    Dec 2008
    Location
    Czech
    Posts
    44
    Thanks
    2
    Thanked 8 Times in 8 Posts
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Default Re: problem with phonon/music player example.

    Hi,
    hopefully it will work for you.
    I also didnt know phonon is in other directory.


    so, best luck then

    radek

Similar Threads

  1. Weird problem: multithread QT app kills my linux
    By Ishark in forum Qt Programming
    Replies: 2
    Last Post: 8th August 2008, 10:12
  2. Steps in solving a programming problem?
    By triperzonak in forum General Programming
    Replies: 8
    Last Post: 5th August 2008, 09:47
  3. Replies: 16
    Last Post: 7th March 2006, 16:57

Bookmarks

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.