Problems with Open-Source Downloads read https://www.qt.io/blog/problem-with-open-source-downloads and https://forum.qt.io/post/638946

Error C1083 "No such file or directory" for <QtSQL>



  • I have in a .pro file:
    @QT += core gui sql@

    In a main.cpp I wrote:
    @#include <QtSQl>@

    And as result I get the error message - error C1083 "No such file or directory" for <QtSQL>.
    But in the Qt creator this header can be open.

    I have Qt 5.2.0 for x86 and x64. In C:\Qt\ folder:
    !http://pastexen.com/i/Q1SRJXV8tJ.png!

    What I am doing wrong?



  • Check the file name in an include directory.
    On a linux the file name is QtSql not QtSQl nor QtSQL.



  • I had the same problem with Qt 5.4. Apparently "clean" and "rebuild" did NOT do a complete clean and rebuild. I needed to manually run "qmake" and then the error went away.



  • I had the same problem with Qt 5.4. Apparently "clean" and "rebuild" did NOT do a complete clean and rebuild. I needed to manually run "qmake" and then the error went away.


Log in to reply