PDA

View Full Version : QSql error with include in Visual Studio 2008



svetlio.zhelev
15th September 2010, 21:29
Hi all,
I have been studying Qt for a while and today I came accross a problem while learning Qt and Databases. I created a project in Visual Studio 2008. I made Business, Data Access Layer, and a Presentation Layer. Added classes, set implementation and started testing. So far so good. The first time i builded the app, no problem. Then i made a change to the code( added a new function ) and when I rebuilded the project it failed with the folloing error:
Error 1 fatal error C1083: Cannot open include file: 'QSql': No such file or directory e:\Qt\Solution\PresentationLayer\main.cpp 6 PresentationLayer
.
Then I thougth it was from VS bug. So I restared it, but the problem existed. Then I made a brand new project and solution file and just included the <QSql> in the main() function without adding any other code and tried to build the project. The problem still existed. Can anyone give me an advice what to do to fix it? Thank you in advance :)

Lykurg
15th September 2010, 22:19
It's called QtSql, Also make sure you have added sql to the QT qmake variable.