1

我正在尝试构建 QMPwidget。它是一个允许 Qt 开发人员将 MPlayer 实例嵌入到他们的应用程序中以方便视频播放的小部件。我已经从这里下载了源文件。我从下载中选择了“主分支的快照”文件。当尝试使用 Qt Creator 构建它时,我收到以下错误:

qmpwidget.cpp:147: error: 'glClearDepth' was not declared in this scope
qmpwidget.cpp:158: error: 'glLoadIdentity' was not declared in this scope
qmpwidget.cpp:166: error: 'GL_QUADS' was not declared in this scope
qmpwidget.cpp:166: error: 'glBegin' was not declared in this scope
qmpwidget.cpp:167: error: 'glTexCoord2f' was not declared in this scope
qmpwidget.cpp:167: error: 'glVertex2f' was not declared in this scope
qmpwidget.cpp:171: error: 'glEnd' was not declared in this scope

以下是项目的 pro 和 pri 文件:

src.pro:

TEMPLATE = lib
DESTDIR = ..
TARGET = qmpwidget
QT += network opengl
CONFIG += staticlib

# Optional features
QT += opengl
CONFIG += pipemode

include(qmpwidget.pri)

qmpwidget.pri

HEADERS += \
    qmpwidget.h

SOURCES += \
    qmpwidget.cpp

!win32:pipemode: {
DEFINES += QMP_USE_YUVPIPE
HEADERS += qmpyuvreader.h
}
4

1 回答 1

1

要编译 QMPwidget,请将项目文件复制到 src 下的 3rdparty 文件夹中,然后使用 Qt 编译它

于 2012-02-20T18:10:15.597 回答