ich experimentiere gerade ein wenig mit Phonon, als Test will ich einfach eine Datei abspielen. Aber schon das Erzeugen der nötigen MediaObjects und des AudioOutputs scheitert an einem Linker-Error.
Code: Alles auswählen
audioOutput = new Phonon::AudioOutput(Phonon::MusicCategory, this);
mediaObject = new Phonon::MediaObject(this);
metaInformationResolver = new Phonon::MediaObject(this);
Phonon::createPath(mediaObject, audioOutput);
Code: Alles auswählen
private:
Phonon::MediaObject *mediaObject;
Phonon::MediaObject *metaInformationResolver;
Phonon::AudioOutput *audioOutput;
QList<Phonon::MediaSource> sources;
Code: Alles auswählen
#include <Phonon/AudioOutput>
#include <Phonon/MediaObject>
#include <Phonon/BackendCapabilities>
Muss ich noch etwas speziell für Phonon in die CMakeLists.txt schreiben o.ä.? Oder in KDevelop etwas konfigurieren? Danke schonmal.Linking CXX executable Musikspieler
CMakeFiles/Musikspieler.dir/Musikspieler_automoc.o: In function `QList<Phonon::MediaSource>::~QList()':
Musikspieler_automoc.cpp:(.text._ZN5QListIN6Phonon11MediaSourceEED1Ev[QList<Phonon::MediaSource>::~QList()]+0x45): undefined reference to `Phonon::MediaSource::~MediaSource()'
CMakeFiles/Musikspieler.dir/mainwindow.o: In function `MainWindow::setupPhonon()':
mainwindow.cpp:(.text+0x29): undefined reference to `Phonon::AudioOutput::AudioOutput(Phonon::Category, QObject*)'
mainwindow.cpp:(.text+0x46): undefined reference to `Phonon::MediaObject::MediaObject(QObject*)'
mainwindow.cpp:(.text+0x63): undefined reference to `Phonon::MediaObject::MediaObject(QObject*)'
mainwindow.cpp:(.text+0x79): undefined reference to `Phonon::MediaObject::setTickInterval(int)'
mainwindow.cpp:(.text+0xaa): undefined reference to `Phonon::createPath(Phonon::MediaNode*, Phonon::MediaNode*)'
mainwindow.cpp:(.text+0xb5): undefined reference to `Phonon::Path::~Path()'
CMakeFiles/Musikspieler.dir/mainwindow.o: In function `MainWindow::addFiles()':
mainwindow.cpp:(.text+0x21f): undefined reference to `Phonon::MediaSource::MediaSource(QString const&)'
mainwindow.cpp:(.text+0x259): undefined reference to `Phonon::MediaSource::MediaSource(Phonon::MediaSource const&)'
mainwindow.cpp:(.text+0x266): undefined reference to `Phonon::MediaSource::~MediaSource()'
mainwindow.cpp:(.text+0x2db): undefined reference to `Phonon::MediaObject::setCurrentSource(Phonon::MediaSource const&)'
CMakeFiles/Musikspieler.dir/mainwindow.o: In function `QList<Phonon::MediaSource>::detach_helper()':
mainwindow.cpp:(.text._ZN5QListIN6Phonon11MediaSourceEE13detach_helperEv[QList<Phonon::MediaSource>::detach_helper()]+0x64): undefined reference to `Phonon::MediaSource::MediaSource(Phonon::MediaSource const&)'
mainwindow.cpp:(.text._ZN5QListIN6Phonon11MediaSourceEE13detach_helperEv[QList<Phonon::MediaSource>::detach_helper()]+0xa5): undefined reference to `Phonon::MediaSource::~MediaSource()'