I found that esentially you need to set several environment variables before configuring Poppler and building the Qt 4 wrapper. Assuming you downloaded the latest source files, untar it and set the required environment variables, see example below:
pablo@ubuntu:~/projects/poppler-0.17.1$ tar zxvf poppler-0.17.1.tar.gz
pablo@ubuntu:~/projects/poppler-0.17.1$ cd poppler-0.17.1
pablo@ubuntu:~/projects/poppler-0.17.1$ export POPPLER_QT4_CFLAGS=-I$QTDIR/include
pablo@ubuntu:~/projects/poppler-0.17.1$ export POPPLER_QT4_CXXFLAGS=-I$QTDIR/include
pablo@ubuntu:~/projects/poppler-0.17.1$ export POPPLER_QT4_LIBS=-L$QTDIR/lib -lQtCore -lQtGui -lQtXml
pablo@ubuntu:~/projects/poppler-0.17.1$ export POPPLER_QT4_LIBS=-L$QTDIR/lib -lQtCore -lQtGui -lQtXml
pablo@ubuntu:~/projects/poppler-0.17.1$ export POPPLER_QT4_TEST_CFLAGS=-I$QTDIR/include
pablo@ubuntu:~/projects/poppler-0.17.1$ export POPPLER_QT4_TEST_LIBS=-L$QTDIR/lib -lQtCore -lQtGui -lQtXml
pablo@ubuntu:~/projects/poppler-0.17.1$ ./configure --enable-poppler-qt4
pablo@ubuntu:~/projects/poppler-0.17.1$ make
pablo@ubuntu:~/projects/poppler-0.17.1$ sudo make installso you'll end up with the Poppler Qt 4 wrapper library and headers installed under /usr/local/lib and /usr/local/include/poppler/qt4 respectively.
You can even try building and running an example from Qt Quartely provided here.
Cheers.
Thanks, worked perfectly! World Geekz
ReplyDelete