Unresolved external symbol with QImage in Qt Creator

423 views Asked by At

I get linkage error in Qt Creator when I want to use QImage.

#include <QCoreApplication>
#include <Qt>
#include <QtCore>
#include <QtWidgets/QtWidgets>
#include <QtGui/QImage>

int main(int argc, char *argv[])
{
    QCoreApplication a(argc, argv);

    QImage *image = new QImage();
    // or QImage *image = new QImage("missile2.jpg");

    return a.exec();
}

and this is project file

QT       += core
QT       += gui

TARGET = RGBLayers
CONFIG   += console
CONFIG   -= app_bundle

TEMPLATE = app


SOURCES += main.cpp

Can anyone help me what is the problem please?

0

There are 0 answers