对VlcQt中功能的未定义引用(安装后)

时间:2018-08-07 08:24:16

标签: c++ qt vlc-qt

我最近为ubuntu 16.04安装了VlcQt库,但是当我尝试使用它时,我得到的只是undefined reference to 'some_function()'

当前,我正在尝试将视频播放器暴露给QML。

Main.cpp

#include <QGuiApplication>
#include <VLCQtCore/Common.h>
#include <VLCQtQml/QmlVideoPlayer.h>

#include "Controller.h"

int main(int argc, char *argv[])
{
    QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);

    QGuiApplication app(argc, argv);

    VlcCommon::setPluginPath(app.applicationDirPath() + "plugins");
    VlcQmlVideoPlayer::registerPlugin();

    Controller controller;
    QQuickWindow *quickWindow = qobject_cast<QQuickWindow *>(controller.view());
    quickWindow->show();

    return app.exec();
}

当我尝试包含库时,Qt intellisense检测到该库存在。

我在做什么错了?

谢谢您的帮助!

//编辑:

我通过他们的存储库安装了它:

add-apt-repository ppa:ntadej/tano 
apt-get install libvlc-qt-core2 libvlc-qt-widgets2 libvlc-qt-dbg libvlc-qt-dev 

//编辑: 这是我在.pro文件中添加库的方法,已经尝试过INCLUDEPATH

LIBS += -lvlccore -lvlc

0 个答案:

没有答案