Impossible to include OpenCV path in Qt Creator
<p>I am trying to configure a new Qt Creator project in order to use OpenCV 3.1.0 in Windows 10. I downloaded the precompiled binaries from <a href="http://opencv.org/downloads.html" rel="nofollow">http://opencv.org/downloads.html</a>, and I created an empty Qt gui project. The problem is that qmake doesn't find the opencv headers, no matter how I try to include their path. Here is my last attempt:</p>

<pre><code>QT       += core gui
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

TARGET = App_v1
TEMPLATE = app

INCLUDEPATH += C:/OpenCV-3.1.0/opencv/build/include
LIBS += -L”C:\OpenCV-3.1.0\opencv\build\x64\vc14\lib”
LIBS += -lopencv_world310d

SOURCES += main.cpp\
        mainwindow.cpp
HEADERS  += mainwindow.h
FORMS    += mainwindow.ui
</code></pre>

<p>And the source:</p>

<pre><code>#include &lt;iostream&gt;

#include &lt;opencv2/core/core.hpp&gt;
#include &lt;opencv2/highgui/highgui.hpp&gt;
#include &lt;opencv2/imgproc/imgproc.hpp&gt;

#include "mainwindow.h"
#include &lt;QApplication&gt;

using namespace std;

int main(int argc, char *argv[])
{
    cv::Mat image = cv::Mat::zeros(100, 100, CV_8UC3);
    cv::imshow("image", image);
    cv::waitKey(10);

    cout &lt;&lt; "Hello cout!" &lt;&lt; endl;
    cerr &lt;&lt; "Hello cerr!" &lt;&lt; endl;
    printf("Hello printf!");
    cout &lt;&lt; flush;

    QApplication a(argc, argv);
    MainWindow w;
    w.show();

    return a.exec();
}
</code></pre>

<p>When I try to compile this, I get: "C1083: Cannot open include file: 'opencv2/core/core.hpp": No such file or directory
(btw thanks Qt Creator for not letting me select and copy the text of the error. Sorry I digress...)</p>

<p>I am sure that the path is correct, and the funny thing is that when I type cv:: the auto completion finds and lists the classes and functions in the cv namespace.... what is going on here?</p>

<p>And btw, OpenCV works perfectly with Visual Studio, so I know that It is installed correctly...</p>