Question

I am trying to build QMPwidget. It is a widget that allows Qt developers to embed an MPlayer instance into their application for convenient video playback. I have downloaded the source files from here. I have selected "Snapshot of the master branch" file from downloads. When try to build it with Qt Creator I am getting these errors:

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

Here are the pro and pri files of the project:

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
}
Was it helpful?

Solution

To compile QMPwidget, copy project files into 3rdparty folder under src and compile it with Qt

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top