Phonon VideoPlayer c ++示例

时间:2016-03-22 13:17:36

标签: c++ qt phonon

我想在Qt 4.7.0中创建视频播放器。我找到了Phonone lib。 我在documetation中找到了例子,但是如果我接受了我的崩溃

代码:

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

也许有人知道它是什么?

0 个答案:

没有答案