Lily Baker
Lily Baker

Reputation: 75

Running dlib on Qt c++

I'm trying to add dlib library to Qt project to run fhog_object_detector_ex.cpp file on ubuntu. I've built dlib using CMake and now i'm trying to run it in Qt.I have added these lines in myproject.pro

SOURCES += $$PWD/dlib-19.2/dlib/all/source.cpp
INCLUDEPATH += $$PWD/dlib-19.2

LIBS += $$PWD/dlib19.2/examples/build/dlib_build/libdlib.a
LIBS += -pthread

I am including these headers in code:

#include <dlib/svm_threaded.h>
#include <dlib/gui_widgets.h>
#include <dlib/image_processing.h>
#include <dlib/data_io.h>

but when i run the program i got errors, here are some errors:enter image description here

Please help me to deal with it.

Upvotes: 1

Views: 1160

Answers (1)

Davis King
Davis King

Reputation: 4791

You need to link to X11 in addition to pthread.

Upvotes: 2

Related Questions