我已经安装了qt 5.0.2和opencv 2.4.5,Windows 7 32位跟随此tutorial,但是当我完成后,我使用上一个链接中提到的示例进行了测试但是我遇到了这个错误
error: opencv2/core/core.hpp: No such file or directory
前5个错误:
C:\opencv\opencv_bin\install\include\opencv2\core\core.hpp:4341: In file included from ..\..\..\..\..\..\opencv\opencv_bin\install\include/opencv2/core/core.hpp:4341:0,
C:\Qt\Qt5.0.2\Tools\QtCreator\bin\test2\main.cpp:2: from ..\test2\main.cpp:2:
C:\opencv\opencv_bin\install\include\opencv2\core\operations.hpp:928: error: prototype for 'cv::Vec<_Tp, n> cv::Matx<_Tp, m, n>::solve(const cv::Vec<_Tp, m>&, int) const' does not match any in class 'cv::Matx<_Tp, m, n>'
C:\Qt\Qt5.0.2\Tools\QtCreator\bin\test2\main.cpp:2: In file included from ..\test2\main.cpp:2:0:
C:\opencv\opencv_bin\install\include\opencv2\core\core.hpp:495: error: candidates are: cv::Matx<_Tp, n, 1> cv::Matx<_Tp, m, n>::solve(const cv::Matx<_Tp, m, 1>&, int) const
有人可以帮助我确定问题和方法 解决它。
答案 0 :(得分:2)
在教程中,这个人实际上告诉你如何做到这一点。提取物:
QT += core
QT -= gui
TARGET = myFirstOpenCVProject
CONFIG += console
CONFIG -= app_bundle
TEMPLATE = app
SOURCES += main.cpp
INCLUDEPATH += C:\\OpenCV-2.3.1\\install\\include # <--- this
LIBS += -LC:\\OpenCV-2.3.1\\install\\lib \
-lopencv_core231.dll \
-lopencv_highgui231.dll \
-lopencv_imgproc231.dll \
-lopencv_features2d231.dll \
-lopencv_calib3d231.dll
答案 1 :(得分:0)
问题已经解决了......这是q creator和opencv之间的可复制性问题,我已经安装了QTsdK,opencv 2.3.1和cmake 2.8.11相同的{{每个想法都以正确的方式进行:)