Пробую скомпилировать как всегда:
Код: Выделить всё
qmake -project
qmake
makeПри этом в файле проекта саму библиотеку добавляю:
Код: Выделить всё
QT += phononА в итоге получаю кучу ошибок:
chups@linux-chups:~/Documents/develop/Qt4/phonon> cd musicplayer/
chups@linux-chups:~/Documents/develop/Qt4/phonon/musicplayer> ls
main.cpp mainwindow.cpp mainwindow.h Makefile musicplayer.pro
chups@linux-chups:~/Documents/develop/Qt4/phonon/musicplayer> make
g++ -c -pipe -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_PHONON_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/default -I. -I/usr/include/QtCore -I/usr/include/QtCore -I/usr/include/QtGui -I/usr/include/QtGui -I/usr/include/phonon -I/usr/include -I. -I. -o main.o main.cpp
In file included from main.cpp:3:
mainwindow.h:6:37: error: phonon/phononnamespace.h: Нет такого файла или каталога
mainwindow.h:7:33: error: phonon/audiooutput.h: Нет такого файла или каталога
mainwindow.h:8:32: error: phonon/seekslider.h: Нет такого файла или каталога
mainwindow.h:9:33: error: phonon/mediaobject.h: Нет такого файла или каталога
mainwindow.h:10:34: error: phonon/volumeslider.h: Нет такого файла или каталога
mainwindow.h:11:41: error: phonon/backendcapabilities.h: Нет такого файла или каталога
mainwindow.h:65:8: warning: no newline at end of file
main.cpp:15:3: warning: no newline at end of file
In file included from main.cpp:3:
mainwindow.h:33: error: ‘Phonon’ has not been declared
mainwindow.h:33: error: expected ‘,’ or ‘...’ before ‘newState’
mainwindow.h:35: error: expected ‘,’ or ‘...’ before ‘::’ token
mainwindow.h:35: error: ISO C++ forbids declaration of ‘Phonon’ with no type
mainwindow.h:36: error: ‘Phonon’ has not been declared
mainwindow.h:36: error: expected ‘,’ or ‘...’ before ‘newState’
mainwindow.h:45: error: ‘Phonon’ has not been declared
mainwindow.h:45: error: ISO C++ forbids declaration of ‘SeekSlider’ with no type
mainwindow.h:45: error: expected ‘;’ before ‘*’ token
mainwindow.h:46: error: ‘Phonon’ has not been declared
mainwindow.h:46: error: ISO C++ forbids declaration of ‘MediaObject’ with no type
mainwindow.h:46: error: expected ‘;’ before ‘*’ token
mainwindow.h:47: error: ‘Phonon’ has not been declared
mainwindow.h:47: error: ISO C++ forbids declaration of ‘MediaObject’ with no type
mainwindow.h:47: error: expected ‘;’ before ‘*’ token
mainwindow.h:48: error: ‘Phonon’ has not been declared
mainwindow.h:48: error: ISO C++ forbids declaration of ‘AudioOutput’ with no type
mainwindow.h:48: error: expected ‘;’ before ‘*’ token
mainwindow.h:49: error: ‘Phonon’ has not been declared
mainwindow.h:49: error: ISO C++ forbids declaration of ‘VolumeSlider’ with no type
mainwindow.h:49: error: expected ‘;’ before ‘*’ token
mainwindow.h:50: error: ‘Phonon’ was not declared in this scope
mainwindow.h:50: error: template argument 1 is invalid
make: *** [main.o] Ошибка 1
В чем проблема? Версия Qt4:
Код: Выделить всё
chups@linux-chups:~> qmake -version
QMake version 2.01a
Using Qt version 4.4.0-snapshot-20080325 in /usr/lib