samedi 28 mars 2015

QT can't find openCV's libs


I've installed OpenCV via this instruction.


I use OpenCV when and build the code via cmake - and it's all ok. But now I'm trying to use OpenCV from QT, and I get errors like this:



error: undefined reference to `cvCreateCameraCapture'


The same errors for all functions from OpenCV.


I tried to add in .pro this code:



INCLUDEPATH += /usr/local/include/opencv2
LIBS += -L/usr/local/lib
LIBS += -lopencv_core
LIBS += -lopencv_imgproc
LIBS += -lopencv_highgui
LIBS += -lopencv_ml
LIBS += -lopencv_video
LIBS += -lopencv_features2d
LIBS += -lopencv_calib3d
LIBS += -lopencv_objdetect
LIBS += -lopencv_contrib
LIBS += -lopencv_legacy
LIBS += -lopencv_flann


But it isn't work. The dir /usr/local/include/opencv2 exist and not empty.


So, what's wrong?




Aucun commentaire:

Enregistrer un commentaire