[poppler] Win32 poppler-qt4
Carlos Rega
carlos_rega at yahoo.co.uk
Thu Dec 16 06:24:52 PST 2010
>
>From: Pete Lindsey <pete.lindsey at hotmail.com>
>To: carlos_rega at yahoo.co.uk
>Sent: Thu, 16 December, 2010 13:41:20
>Subject: RE: [poppler] Win32 poppler-qt4
>
> Yes, sorry should have been more specific, I have used both CMAKE 2.8 with
>Mingw32 4.4.0, and seperately msys 1.0.11+ GNU make 3.81
>
I use the mingw that comes with Qt, then msys, and the gtk bundle dumped in the
msys directory.
I use a script to build and install the poppler from source:
<start script>
#!/bin/bash
export PKG_CONFIG_PATH=path-to-gtkbundle/lib/pkgconfig
export PKG_CONFIG=path-to-gtkbundle/bin/pkg-config.exe
export QTDIR=path-to-qt
export QTLIBDIR=$QTDIR/lib
export QTINCLUDEDIR=$QTDIR/include
export QTBINDIR=$QTDIR/bin
#do a build with the debug libraries
#this line will fail if source is just unpacked
mingw32-make clean
./configure -enable-poppler-qt4 -disable-poppler-cpp -disable-utils
-disable-cairo-output -disable-poppler-glib
POPPLER_QT4_CFLAGS="-I/c/Qt/2010.05/qt/include"
POPPLER_QT4_LIBS="-L/c/Qt/2010.05/qt/lib -L/c/Qt/2010.05/qt/bin -lQtCored4
-lQtGuid4 -lQtXmld4" POPPLER_QT4_TEST_CFLAGS="-I/c/Qt/2010.05/qt/include"
POPPLER_QT4_TEST_LIBS="-L/c/Qt/2010.05/qt/lib -L/c/Qt/2010.05/qt/bin -lQtTestd4"
mingw32-make
rm -rf debug
mkdir debug
cd poppler/.libs
cp libpoppler.a libpoppler.dll.a libpoppler.la libpoppler-7.dll ../../debug
cd ../../qt4/src/.libs
cp libpoppler-qt4.a libpoppler-qt4.dll.a libpoppler-qt4.la libpoppler-qt4-3.dll
../../../debug
cd ../../..
#now a build with the release libraries
mingw32-make clean
./configure -enable-poppler-qt4 -disable-poppler-cpp -disable-utils
-disable-cairo-output -disable-poppler-glib
POPPLER_QT4_CFLAGS="-I/c/Qt/2010.05/qt/include"
POPPLER_QT4_LIBS="-L/c/Qt/2010.05/qt/lib -L/c/Qt/2010.05/qt/bin -lQtCore4
-lQtGui4 -lQtXml4" POPPLER_QT4_TEST_CFLAGS="-I/c/Qt/2010.05/qt/include"
POPPLER_QT4_TEST_LIBS="-L/c/Qt/2010.05/qt/lib -L/c/Qt/2010.05/qt/bin -lQtTest4"
./clean-ansi.sh
mingw32-make
rm -rf release
mkdir release
cd poppler/.libs
cp libpoppler.a libpoppler.dll.a libpoppler.la libpoppler-7.dll ../../release
cd ../../qt4/src/.libs
cp libpoppler-qt4.a libpoppler-qt4.dll.a libpoppler-qt4.la libpoppler-qt4-3.dll
../../../release
cd ../../..
<end script>
The script works for me, but it is very primitive (no error checking or
anything), so as always, no guarantee that it will do what you need.
Carlos
>
>
>
>Of course out of the box there are a lot of dependencies... and not knowing
>which ones actually end up making a difference have tried about every
>combination I can think of, sometimes using precompiled windows libraries and in
>
>other cases compiling with CMAKE... In the MSYS environment, I have successfully
>
>compiled, however I can't get the binaries generated to work outside of the msys
>
>environment, additionally I can't seem to get it to build with the QT4
>Wrapper... Which I am hopping will not suffer from the problem the executables
>do...
You will need to add the dlls associated to the current directory, in general
will need these:
mingwm10.dll
libgcc_s_dw2-1.dll
freetype6.dll
libpng14-14.dll
In terms of dependencies you definetely need freetype and libpng, and also as I
explained somewhere else, pkgconfig. These all come with the gtkbundle.
Let me know if this helps.
Carlos
More information about the poppler
mailing list