I'm trying to create a a Qt app with some OpenGL widgets, I'm new using Qt (couple of hours experience) and I got this problem when trying to compile my code:
error: LNK2019: unresolved external symbol __imp_glClearColor referenced in function "public: virtual void __cdecl ShapeWidget::initializeGL(void)" (?initializeGL@ShapeWidget@@UEAAXXZ)
My .pro file includes opengl as following:
QT += core gui opengl
I really don't know what could it be, and I spent a couple of hours already trying to figure out the problem. At my widget cpp file I have the following:
#include "shapewidget.h"
ShapeWidget::ShapeWidget(QWidget *parent) :
QGLWidget(parent)
{
}
void ShapeWidget::initializeGL()
{
glClearColor(1, 1, 0, 1);
}
void ShapeWidget::paintGL()
{
}
void ShapeWidget::resizeGL(int w, int h)
{
}
The line that mess everything up is the one that calls the glClearColor function.