Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

VS Tools 2.7.1 rev 15



  • Since VS Tools 2.7.1 I can't compile my C++ code! I'm getting errors like:

    C:\path\fileid(4,10): fatal error C1083: Cannot open include file: 'QCoreApplication': No such file or directory

    I don't think I changed the project (apart from the lrelease stuff), so clearly something has gone slightly awry.

    9995ed31-433c-4342-94c6-2296170afb19-image.png

    What do I need to change to get this compiling again? Clearly the QT include directory needs to be picked up somehow but I thought that VS Tools handled that stuff.

    Yes this could well be pilot error, and I'm happy to be told what I've done wrong!!!

    Thanks
    David



  • I manually added the following to the C++ Include directories:

    $(QtInstallDir)\include;$(QtInstallDir)\include\QtWidgets;$(QtInstallDir)\include\QtGui;$(QtInstallDir)\include\QtCore;

    which has enabled me to compile again, but I don't believe this is the "correct answer"


  • Moderators

    If you go to the project properties page there's a QtProject Settings section where you can choose which modules you're using. This will add necessary include directories and libraries for linking.

    Qt modules



  • That's already set, but it didn't set the include path :(

    c51864fa-61e2-405d-9e60-b61e6d8a8f6d-image.png
    David


  • Moderators

    Maybe the settings it generates got lost somehow. There's always the "have you tried turning it off and on again" method - try removing all the modules, save project, restore modules and rebuild.



  • Sadly clearing Qt Modules and reinstating (saving between) didn't help.

    David




Log in to reply