Important: Please read the Qt Code of Conduct -

Trouble with #include in Windows

  • I am trying to get started with Qt on Windows 10 using Qt Creator 4.8.1 with MSVC2017

    I've gotten to the point of trying to compile/run the code and am getting an error C1083 as shown below:

    I've verified that opencv.hpp does exist at the location indicated when I hover the cursor over #include but somehow the compiler isn't finding it?

    The .pro file includes this:

    win32: {

    The opencv.pri file looks like this:

    INCLUDEPATH += D:/newopencv/build/install/include
    Debug: {
    LIBS += -lD:/newopencv/build/install/x64/vc15/lib/opencv_world342d
    Release: {
    LIBS += -lD:/newopencv/build/install/x64/vc15/lib/opencv_world342

    opencv.hpp is essentially a long list of #includes and I wonder if one or more of them is missing but I don't see an obvious way to figure out which one short of parsing the file and comparing it to the include directory.

    Thanks in advance for any suggestions!

  • Problem Solved:
    '/' not '\' in .pro file AND run qmake after change.

    I tried changing '\' to '/' but didn't run qmake.