#include "mainwindow.h"
#include "ui_mainwindow.h"
#include <Phonon/MediaSource>
#include <QUrl>
#include <Phonon/MediaObject>
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow)
{
ui->setupUi(this);
}
MainWindow::~MainWindow()
{
delete ui;
}
void MainWindow::on_pushButton_clicked()
{
QUrl url("http://www.example.com/music.ogg");
Phonon::MediaObject *wow =
Phonon::createPlayer(Phonon::NoCategory,
Phonon::MediaSource(url));
wow->play();
}
This code won't play the file, and I'm getting this error:
:: error: collect2: ld returned 1 exit status
Can anyone help me get the file to play when I click the button?
Thanks.
I guess that there are one or more functions declared in the header file but their bodies haven't been built yet.
for example:
So, please check that all the functions in the whole project have their bodies.
For a basic phonon media player,