Ich bin noch relativ neu in QT, habe bisher nur ein Projekt mit QT Jambi gemacht, aber noch kein C++ Qt programmiert.
Ich verwende unter Linux Eclipse + QT Integration und habe QT 4.4 + Phonon installiert. (Verwende KDE 4 mit ein paar auf Phonon basierenden Applikationen wie z.b. Amarok 2) Dies nur vorab um zu zeigen, dass ich auch wirklich alles notwendige installiert habe
Ich möchte eine kleine Phonon-Testanwendung schreiben um später phonon in ein anderes Projekt integrieren zu können.
Dazu habe ich im pro-File phonon hinzugefügt:
Code: Alles auswählen
TEMPLATE = app
TARGET = consoleradio
QT += core \
gui \
phonon
HEADERS +=
SOURCES += main.cpp
FORMS +=
RESOURCES +=
In der main.cpp befindet sich folgender source-code:
Code: Alles auswählen
#include <QtGui>
#include <phonon>
int main(int argc, char **argv)
{
QApplication app(argc, argv);
Phonon::MediaObject *music =
Phonon::createPlayer(Phonon::MusicCategory,Phonon::MediaSource("/path/mysong.wav"));
music->play();
return app.exec();
}
http://doc.trolltech.com/4.4/phonon-module.html
Beim Kompilieren scheitert es allerdings immer daran, dass er phonon nicht findet:
Das kann aber eigentlich nicht sein, weil unter /usr/include/phonon alles vorhanden ist! Ein ls -l:make debug
make -f Makefile.Debug
make[1]: Entering directory `/home/andreas/workspace/consoleradio'
g++ -c -pipe -g -Wall -W -D_REENTRANT -DQT_PHONON_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt/mkspecs/linux-g++ -I. -I/usr/include/QtCore -I/usr/include/QtCore -I/usr/include/QtGui -I/usr/include/QtGui -I/usr/include/phonon -I/usr/include/phonon -I/usr/include -Idebug -I. -o debug/main.o main.cpp
main.cpp:2:18: error: phonon: No such file or directory
Auch die Libs selber sind im System vorhanden. Ein ls -l /usr/lib/libph*-rw-r--r-- 1 root root 1919 2008-11-19 23:20 abstractaudiooutput.h
-rw-r--r-- 1 root root 6633 2008-11-19 23:20 abstractmediastream.h
-rw-r--r-- 1 root root 2301 2008-11-19 23:20 abstractvideooutput.h
-rw-r--r-- 1 root root 2992 2008-11-19 23:20 addoninterface.h
-rw-r--r-- 1 root root 6853 2008-11-19 23:20 audiooutput.h
-rw-r--r-- 1 root root 4415 2008-11-19 23:42 audiooutputinterface.h
-rw-r--r-- 1 root root 7119 2008-11-19 23:20 backendcapabilities.h
-rw-r--r-- 1 root root 9733 2008-11-19 23:20 backendinterface.h
-rw-r--r-- 1 root root 3758 2008-11-19 23:20 effect.h
-rw-r--r-- 1 root root 2324 2008-11-19 23:20 effectinterface.h
-rw-r--r-- 1 root root 7644 2008-11-19 23:20 effectparameter.h
-rw-r--r-- 1 root root 2522 2008-11-19 23:20 effectwidget.h
drwxr-xr-x 2 root root 4096 2008-11-27 07:51 experimental/
-rw-r--r-- 1 root root 5800 2008-11-19 23:20 mediacontroller.h
-rw-r--r-- 1 root root 2211 2008-11-19 23:20 medianode.h
-rw-r--r-- 1 root root 23104 2008-11-20 13:13 mediaobject.h
-rw-r--r-- 1 root root 8949 2008-11-19 23:20 mediaobjectinterface.h
-rw-r--r-- 1 root root 8523 2008-11-19 23:20 mediasource.h
-rw-r--r-- 1 root root 11657 2008-11-19 23:20 objectdescription.h
-rw-r--r-- 1 root root 16761 2008-11-19 23:20 objectdescriptionmodel.h
-rw-r--r-- 1 root root 7858 2008-11-19 23:20 path.h
-rw-r--r-- 1 root root 1802 2008-11-19 23:20 phonon_export.h
-rw-r--r-- 1 root root 3887 2008-11-19 23:20 phonondefs.h
-rw-r--r-- 1 root root 8841 2008-11-27 07:50 phononnamespace.h
-rw-r--r-- 1 root root 3800 2008-11-19 23:20 platformplugin.h
-rw-r--r-- 1 root root 4883 2008-11-19 23:20 seekslider.h
-rw-r--r-- 1 root root 4514 2008-11-19 23:20 streaminterface.h
-rw-r--r-- 1 root root 6258 2008-11-20 13:06 videoplayer.h
-rw-r--r-- 1 root root 7631 2008-11-19 23:20 videowidget.h
-rw-r--r-- 1 root root 2382 2008-11-19 23:20 videowidgetinterface.h
-rw-r--r-- 1 root root 6326 2008-11-19 23:20 volumefadereffect.h
-rw-r--r-- 1 root root 1976 2008-11-19 23:20 volumefaderinterface.h
-rw-r--r-- 1 root root 4992 2008-11-19 23:20 volumeslider.h
Habe ich irgendetwas übersehen? Bin mittlerweile etwas ratloslrwxrwxrwx 1 root root 14 2008-11-27 07:51 libphonon.so -> libphonon.so.4*
lrwxrwxrwx 1 root root 18 2008-11-27 07:51 libphonon.so.4 -> libphonon.so.4.2.1*
-rwxr-xr-x 1 root root 320030 2008-11-27 07:51 libphonon.so.4.2.1*
lrwxrwxrwx 1 root root 26 2008-11-27 07:51 libphononexperimental.so -> libphononexperimental.so.4*
lrwxrwxrwx 1 root root 30 2008-11-27 07:51 libphononexperimental.so.4 -> libphononexperimental.so.4.2.1*
-rwxr-xr-x 1 root root 64592 2008-11-27 07:51 libphononexperimental.so.4.2.1*
Danke für eure Hilfe!
Schöne Grüße,
Flasher