Я хочу создать видеоплеер в Qt 4.7.0. И я нахожу Phonone lib.
Я нахожу пример в документации, но если я возьму, у меня есть сбой
Код:
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow)
{
ui->setupUi(this);
VideoPlayer *player = new VideoPlayer(VideoCategory);
player->setFixedSize(QSize(400,300));
player->move(1280-400,0);
player->show();
connect(player, SIGNAL(finished()), player, SLOT(deleteLater()));
player->play(MediaSource(QString("C:\\vid.flv")));
}
Ошибка:
debug/mainwindow.o: In function `MainWindow':
C:\Qt\2010.05\videoPlayer-build-desktop/../videoPlayer/mainwindow.cpp:16: undefined reference to `_imp___ZN6Phonon11VideoPlayerC1ENS_8CategoryEP7QWidget'
C:\Qt\2010.05\videoPlayer-build-desktop/../videoPlayer/mainwindow.cpp:21: undefined reference to `_imp___ZN6Phonon11MediaSourceC1ERK7QString'
C:\Qt\2010.05\videoPlayer-build-desktop/../videoPlayer/mainwindow.cpp:21: undefined reference to `_imp___ZN6Phonon11VideoPlayer4playERKNS_11MediaSourceE'
C:\Qt\2010.05\videoPlayer-build-desktop/../videoPlayer/mainwindow.cpp:21: undefined reference to `_imp___ZN6Phonon11MediaSourceD1Ev'
C:\Qt\2010.05\videoPlayer-build-desktop/../videoPlayer/mainwindow.cpp:21: undefined reference to `_imp___ZN6Phonon11MediaSourceD1Ev'
C:\Qt\2010.05\videoPlayer-build-desktop/../videoPlayer/mainwindow.cpp:16: undefined reference to `_imp___ZN6Phonon11VideoPlayerC1ENS_8CategoryEP7QWidget'
C:\Qt\2010.05\videoPlayer-build-desktop/../videoPlayer/mainwindow.cpp:21: undefined reference to `_imp___ZN6Phonon11MediaSourceC1ERK7QString'
C:\Qt\2010.05\videoPlayer-build-desktop/../videoPlayer/mainwindow.cpp:21: undefined reference to `_imp___ZN6Phonon11VideoPlayer4playERKNS_11MediaSourceE'
C:\Qt\2010.05\videoPlayer-build-desktop/../videoPlayer/mainwindow.cpp:21: undefined reference to `_imp___ZN6Phonon11MediaSourceD1Ev'
C:\Qt\2010.05\videoPlayer-build-desktop/../videoPlayer/mainwindow.cpp:21: undefined reference to `_imp___ZN6Phonon11MediaSourceD1Ev'
collect2: ld returned 1 exit status
Может кто знает что это?
Задача ещё не решена.
Других решений пока нет …