1

I created a new widget gui application in QT . and in order to using opencv , I added INCLUDEPATH and LIBS to my projects as following :

QT       += core gui

greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

TARGET = testqt4
TEMPLATE = app


SOURCES += main.cpp\
        widget.cpp

INCLUDEPATH += C:/opencv/build/include

LIBS += -LC:\opencv\build\x64\vc12\lib
-lopencv_world310d

HEADERS  += widget.h

FORMS    += widget.ui

and I included my desired opencv headers as following :

#ifndef WIDGET_H
#define WIDGET_H

#include <QWidget>
#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
....

but when I builded the project I encountered with this error :

enter image description here

can anyone help me to fix this error ? thank you .

2
  • The error is self descriptive. Check your paths. Check if highgui/highgui.hpp is present. Commented Aug 24, 2016 at 6:19
  • yes , this path exists but QT dont find this path . I don't know why this error happens ? Commented Aug 24, 2016 at 8:39

1 Answer 1

1

Are you using qt creator?

It will not update your makefile once you changed your .pro file.

Right click on the project folder in Projects view and click "Run qmake" should fix it.

Sign up to request clarification or add additional context in comments.

1 Comment

Thank you .The problem solved , thank you very much indeed .

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.