Libary not found in QT creator

I am trying to link OpenCV to my qt project, but for some reason it doesn't seem to able to find my files. my .pro file looks like this

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
QT       += core gui

greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

TARGET = opens
TEMPLATE = app

INCLUDEPATH += /usr/local/include

HEADERS  += mainwindow.h

LIBS += -lm -lopencv_core -lopencv_highgui -lopencv_video -lopencv_imgproc

SOURCES += main.cpp\
        mainwindow.cpp


FORMS    += mainwindow.ui


I get the error message saying
library not found for -lopencv_core
and it is the same for the other ones.


I've been following this guide : https://www.youtube.com/watch?v=i9hYiMXLZRs
What is going on?
Last edited on
Are the libraries in the lib folder?
If you want to keep them in a custom folder, this will work:
LIBS += "-L/my/opencv/libs" -lm -lopencv_core (...)


Otherwise... Probably they're just not there.
They are in the folder.
Try running the linker in verbose mode (QMAKE_LFLAGS += -v) (not tested).
Check the compile log for all the paths looked for. You can also try to manually add the library's path, to see if the problem persists.
Topic archived. No new replies allowed.