ZHoscar
ZHoscar

Reputation: 21

Qt is not linking to sql

I've been searching for similar problem but none is specific to mine..

It looks like the Qt is not linking to sql even though I add QT += sql on the .pro file(which does enable me to have auto fill when I try to include qtsql).

this is my .pro file:

QT       += core gui
QT       += sql

greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

TARGET = Mysql_Testing
TEMPLATE = app


DEFINES += QT_DEPRECATED_WARNINGS


SOURCES += \
        main.cpp

HEADERS += \
        mainwindow.h

FORMS += \
        mainwindow.ui



//

I'm on OS X 10.12 with qt version 5.9.1.

EDIT: After deleting

 HEADERS += \
    mainwindow.h

In the .pro file it solves my problem. It seems I delete the original .h file without delete the definition in the .pro file as well

Upvotes: 0

Views: 72

Answers (1)

Yam Marcovic
Yam Marcovic

Reputation: 8141

My guess is that you have declared the destructor MainWindow::~MainWindow() in the header file, but have not supplied a definition anywhere (e.g. in the CPP file).

Upvotes: 1

Related Questions