C1083: Cannot open include fhile: 'QtSql': No such file or directory
-
wrote on 21 Jul 2016, 21:26 last edited by
I just installed 5.7.0, created a Qt Widgets Application, added sql (QT += core gui sql) to the .pro file and added '#include <QtSql>' to the mainwindow.h file. No other changes made. When compiling with 'MSVC2013 64 ' in Debug mode I receive the error noted. When I change to release mode, the program compiles and runs. I manually ran the qmake file with the basic parameters noted in the documentation. No effect. Any ideas on how to resolve?
-
Hi and welcome to devnet,
How did you install Qt ?
The include failure looks pretty strange. What if you include something like QSqlTableModel ?
-
wrote on 22 Jul 2016, 10:58 last edited by
Qt installation was with the main Windows install program with binary code. Changing the include file produced the same error except for the file name. Thank you.
-
wrote on 22 Jul 2016, 11:01 last edited by
In the pro file add:
QT+= sql
-
Did you check your Qt installation folder content ?
-
wrote on 22 Jul 2016, 23:30 last edited by
@SGaist The sub folders in the Qt 5.7 folder look normal. The appropriate bin folder has Qt5Sql.dll and Qt5Sqld.dll files. Anything else I should look for? During installation, I chose only 5.7 packages. Would older ones be helpful?
-
Build -> Run qmake
and build again. Always do that when you edit .pro file. -
Build -> Run qmake
and build again. Always do that when you edit .pro file.wrote on 23 Jul 2016, 11:32 last edited by@Chris-Kawa That does seem to have resolved the issue. Thank you.
-
The good all classic qmake re-run… :D
9/10