 |
Linux Format forums Help, discussion, magazine feedback and more
|
| View previous topic :: View next topic |
| Author |
Message |
Bruno LXF regular

Joined: Tue Sep 18, 2007 7:07 pm Posts: 139 Location: Cambridgeshire, UK
|
Posted: Mon Aug 01, 2011 3:17 pm Post subject: "Get Started With Qt" tutorial on TuxRadar - help |
|
|
Hi All,
I've been following the "Create a Media Player" tutorial on http://www.tuxradar.com/learnqt and have run into a problem getting it to run. I get an error message "~/src/mediamangler/mainwindow.h:11: error: Phonon: No such file or directory"
I've done a search online, but there seems to be more heat than light surrounding this issue. What I think is happening is that Qt Creator cannot find the Phonon libraries and/or headers. Indeed the "#include <Phonon>" entry near the top of the "mainwindow.h" file has a wiggly yellow line underneath it (suggesting an error?). When I mousepointer-over the entry, the "Phonon: No such file or directory" message appears in blue near by. Other entries, like "#include <QList>" give a message of "/usr/include/QtCore/QList" in blue, an obvious directory path.
It looks like it is a simple matter of adding the path to Phonon in a config file somewhere but I'm stumped as to where to find it (or how to add the path it via Qt Creator). Any ideas please?
I'm using openSuSE 11.4, 64 bit, with Qt 4.7.1 and Qt Creator 2.1.0 on one machine and openSuSE 11.3, 32 bit, with Qt 4.6.3 and Qt Creator 1.3.1 on another machine, I have the same problem on both. The "phonon" and "phonon-devel" packages are present on both systems.
Many thanks in advance for your help,
Bruno |
|
| Back to top |
|
 |
Bruno LXF regular

Joined: Tue Sep 18, 2007 7:07 pm Posts: 139 Location: Cambridgeshire, UK
|
Posted: Tue Aug 02, 2011 6:45 pm Post subject: Not fixed but kludged |
|
|
OK, at risk of looking like I'm bumping my post, perhaps the best place to try is the Qt forums before coming here. However, if anyone else is having the same problem, the following link contains some illumination http://www.qtforum.org/article/27656/phonon-mediaobject-no-such-file-or-directory.html#post95894.
By including the following code at the top of the "mainwindow.h" file:
| Code: | #include <Phonon/MediaObject>
#include <Phonon/AudioOutput> |
and by installing the following links:
| Code: | ln -s /usr/include/phonon/ /usr/include/Phonon
ln -s /usr/include/phonon/ /usr/include/Qt/Phonon
ln -s /usr/include/phonon/ /usr/include/Qt/phonon
|
The app runs, success! But I don't understand why I need to specify every bit of Phonon that I use (#include <Phonon/MediaObject> etc) rather than just Phonon in general (#include <Phonon>). Despite adding the links, this still does not work.
TTFN, Bruno |
|
| Back to top |
|
 |
| View previous topic :: View next topic |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|
|