Errors while linking in Qt5 with poppler
10:40 28 Mar 2015

/usr/lib/libpoppler.so.50: undefined reference to std::__throw_out_of_range_fmt(char const*, ...)@GLIBCXX_3.4.20' Makefile:156: recipe for target 'DocViewer' failed /usr/lib/libsystemd.so.0: undefined reference tolzma_stream_decoder@XZ_5.0' /usr/lib/libQt5Core.so: undefined reference to __cxa_throw_bad_array_new_length@CXXABI_1.3.8' /usr/lib/libsystemd.so.0: undefined reference tolzma_end@XZ_5.0' /usr/lib/libsystemd.so.0: undefined reference to `lzma_code@XZ_5.0' collect2: error: ld returned 1 exit status make: *** [DocViewer] Error 1 20:53:35: The process "/usr/bin/make" exited with code 2.

I get the errors mentioned above while compiling a program using poppler in Qt5.

Below is my project file, should in change something?

QT       += core gui

greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

TARGET = DocViewer
TEMPLATE = app

INCLUDEPATH  += /usr/include/poppler/qt5
LIBS         += -L/usr/lib -lpoppler-qt5

SOURCES += main.cpp\
        mainwindow.cpp

HEADERS  += mainwindow.h

FORMS    += mainwindow.ui
c++ linux qt5 poppler