Quantcast
Channel: Installation and Deployment
Viewing all articles
Browse latest Browse all 22112

LNK 2019: unresolved external symbol "__declspec(dllimport) public: void__thiscall

$
0
0
Error: http://puu.sh/3m6Qr.png my files .pro #------------------------------------------------- # # Project created by QtCreator 2013-06-22T00:33:21 # #-------------------------------------------------   QT       += core gui QT       += widgets QT       += network   greaterThan(QT_MAJOR_VERSION, 4): QT += widgets   TARGET = guangdong TEMPLATE = app   SOURCES += main.cpp\         login.cpp   HEADERS  += login.h   FORMS    += login.ui login.cpp #include "login.h" #include "ui_login.h" #include <QtSql/QSql> #include <QtSql/QSqlDatabase> #include <QDebug> #include <Query.h> #include <QString> #include <QtSql/QSqlQuery> #include <QtNetwork/QNetworkInterface>   login::login(QWidget *parent) :     QMainWindow(parent),     ui(new Ui::login) {     ui->setupUi(this);     blah(); }   login::~login() {     delete ui; } void login::blah() {    // QSqlQuery query;     QSqlDatabase db = QSqlDatabase::addDatabase("QMYSQL");     db.setHostName("blah");     db.setDatabaseName("blah");     db.setUserName("blah");     db.setPassword("blah");     bool ok = db.open();       if ( ok ) {         ui->label->setText("databaseopen");         db.close();     }     else         ui->label->setText("Error opening"); } main.cpp #include "login.h" #include <QApplication>   int main(int argc, char *argv[]) {     QApplication a(argc, argv);     login w;     w.show();         return a.exec(); } I’m not an expert programmer at all, please answer me like i dont know anything, thank you! Edit: I am using Qt 5.0.2 and msvc2010 compiler

Viewing all articles
Browse latest Browse all 22112

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>