【问题标题】:Qt4 undefined reference to `QAbstractVideoSurface::QAbstractVideoSurface(QObject*)' in Ubuntu 14.04在 Ubuntu 14.04 中,Qt4 未定义对 `QAbstractVideoSurface::QAbstractVideoSurface(QObject*)' 的引用
【发布时间】:2015-04-22 15:08:42
【问题描述】:

我看到了 2 个相关的问题:

但他们都没有解决我的问题。 所以错误就是标题所说的,总共有76个错误:

/videowidgetsurface.cpp:15: error: undefined reference to `QAbstractVideoSurface::QAbstractVideoSurface(QObject*)' 

我使用Qt4.8.6QtCreator3.3.2Ubuntu14.04(i386)

.pro文件是这样的:

QT       += core gui multimediakwidgets widgets

greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

TARGET = Test1
TEMPLATE = app


SOURCES += main.cpp \
    videowidgetsurface.cpp \
    videoplayer.cpp \
    videowidget.cpp

HEADERS  += \
    videowidgetsurface.h \
    videoplayer.h \
    videowidget.h

我试过了

QT       += core gui multimedia 

不起作用,此版本的 Qt4 不包括 QtMultimedia 模块。

这是来自Qt官方教程的一个例子。有任何想法吗?提前致谢。

【问题讨论】:

    标签: c++ linux qt qt4


    【解决方案1】:
    QT += multimedia
    

    这适用于 Qt5。

    对于 Qt4 应该是这样的:

    CONFIG += mobility
    MOBILITY = multimedia
    

    See an example.

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2018-12-09
      • 2020-11-23
      • 2015-07-30
      • 1970-01-01
      • 1970-01-01
      • 2014-05-24
      • 2015-02-06
      相关资源
      最近更新 更多