I compiled poppler statically. I added poppler library to my pro file:
#-------------------------------------------------
#
# Project created by QtCreator 2014-06-14T21:26:48
#
#-------------------------------------------------
QT += core gui
QT += sql
TARGET = project2
TEMPLATE = app
CONFIG += staticlibs
CONFIG += static
SOURCES += main.cpp\
project.cpp
HEADERS += project.h
FORMS += project.ui
LIBS += /usr/lib/libpoppler-qt4.so
#-------------------------------------------------
#
# Project created by QtCreator 2014-06-14T21:26:48
#
#-------------------------------------------------
QT += core gui
QT += sql
TARGET = project2
TEMPLATE = app
CONFIG += staticlibs
CONFIG += static
SOURCES += main.cpp\
project.cpp
HEADERS += project.h
FORMS += project.ui
LIBS += /usr/lib/libpoppler-qt4.so
To copy to clipboard, switch view to plain text mode
When I add .so file my app works. But if I add .a file my app does not work.
LIBS += /usr/lib/libpoppler-qt4.a
LIBS += /usr/lib/libpoppler-qt4.a
To copy to clipboard, switch view to plain text mode
Errors are :
/usr
/lib
/libpoppler
-qt4.
a(poppler
-document.
o):-1: In function `Poppler
::DocumentData::setPaperColor(QColor const
&)': /home/eee/Desktop/poppler-0.8.7/qt4/src/poppler-private.h:230: error: undefined reference to `SplashOutputDev::setPaperColor(unsigned char*)'
/usr/lib/libpoppler-qt4.a(poppler-document.o):-1: In function `Poppler::DocumentData::getOutputDev()':
/home/eee/Desktop/poppler-0.8.7/qt4/src/poppler-private.h:141: error: undefined reference to `SplashOutputDev::startDoc(XRef*)'
/usr
/lib
/libpoppler
-qt4.
a(poppler
-document.
o):-1: In function `Poppler
::Document::linkDestination(QString const
&)': ...
/usr/lib/libpoppler-qt4.a(poppler-document.o):-1: In function `Poppler::DocumentData::setPaperColor(QColor const&)':
/home/eee/Desktop/poppler-0.8.7/qt4/src/poppler-private.h:230: error: undefined reference to `SplashOutputDev::setPaperColor(unsigned char*)'
/usr/lib/libpoppler-qt4.a(poppler-document.o):-1: In function `Poppler::DocumentData::getOutputDev()':
/home/eee/Desktop/poppler-0.8.7/qt4/src/poppler-private.h:141: error: undefined reference to `SplashOutputDev::startDoc(XRef*)'
/usr/lib/libpoppler-qt4.a(poppler-document.o):-1: In function `Poppler::Document::linkDestination(QString const&)':
...
To copy to clipboard, switch view to plain text mode
Bookmarks