Answer the question
In order to leave comments, you need to log in
How to install OpenCV for C++ in QT Creator?
Good afternoon! Installed OpenCV (Downloaded and unpacked).
Then I created a project in QT Creator, in the .pro file I specified the paths for the libraries:
INCLUDEPATH+=C:\opencv\build\include\
LIBS+= C:\\opencv\\pro\\lib\\opencv_core2413d.dll
LIBS+= C:\\opencv\\pro\\lib\\opencv_highgui2413d.dll
#include "opencv2/core/mat.hpp"
#include <opencv/cv.h>
#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
Answer the question
In order to leave comments, you need to log in
LIBS += -LC:/opencv/pro/lib -lxxx
xxx is the filename with a extension, without extension and lib prefix.
If it is libopencv_core.a, then you need -lopencv_core
INCLUDEPATH += C:/opencv/build/include
LIBPATH += C:/opencv/pro/lib
LIBS += -lopencv_core
should work
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question