Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

First, it's good to install the library. After make, do a sudo make install to copy the library files to the system folders (/usr/local/...)

Then, add to the QT .pro file:

# OpenCV
INCLUDEPATH += /usr/local/include/
LIBS += $(shell pkg-config opencv --libs)

That's all!

I think there are several problems with your pri file (the paths are not always correct). It's better to use the cleaner method described above.

First, it's good to install the library. After make, do a sudo make install to copy the library files to the system folders (/usr/local/...)

Then, add to the QT .pro file:

# OpenCV
INCLUDEPATH += /usr/local/include/
/usr/local/include/opencv4
LIBS += $(shell pkg-config opencv --libs)

That's all!

I think there are several problems with your pri file (the paths are not always correct). It's better to use the cleaner method described above.