blob: 3cdf0fc89d6f2f4889921cff5f45d36946f3d763 [file] [log] [blame] [edit]
Overview.
---------
There are 2 ways to compile poppler on Windows:
* using mingw compiler under cygwin
* using native Visual Studio (msvc) makefile
This document describes the second method.
First, the native msvc makefile is meant as a template, not a final product.
It only builds statically linked 'perf-test' executable. If you want to
incorporate poppler into your own program, you can use msvc makefile as an
example of how to compile poppler code on Windows with msvc.
Poppler depends on 3 libraries that are not easily available on Windows:
* freetype
* libjpeg
* zlib
To make it easy, I've made those dependencies available as pre-compiled
files. You need to download http://windevlibs.googlecode.com/files/ext.zip
and unzip under 'ext' directory. Those are header files and static libraries
for freetype, libjpeg and zlib.
You can use your own static or dll versions of those dependencies (most likely
that will require tweaking a makefile).
Compilation.
------------
The msvc makefile is called 'makefile.vc' and you can compile poppler on command
line with: 'nmake -f makefile.vc TARGET=rel' (or TARGET=dbg).
You need to have nmake in your path. If you have Visual Studio 2005, you can
setup the environment by executing
"C:\Program Files\Microsoft Visual Studio 8\Common7\Tools\vsvars32.bat" batch
file (assuming standard installation).
Other versions of Visual Studio have an equivalent of this file - it's just
named differently.
The build works for me with Visual Studio 2005 SP1 but Visual Studio 2005 and
(free) Visual Studio 2005 Express should work as well.
Other versions of Visual Studio should work as well (makefile might need to
be tweaked since some of the linker/compiler flags might have changed).
The result of compilation is a 'perftest.exe' in either 'rel' or 'dbg' directory.
It's a command line application that shows the basics of using poppler API and
is meant for regression and performance testing. You can use it like this:
perftest -slowpreview file.pdf
For more advanced usage, use --help option or consult the sources.
When you have problems.
-----------------------
I would like to be able to say "post to a mailing list and you'll get help"
but realistically, you're on your own.
If there are problems, they're most likely due to different/incorrect setup
on your machine and not in poppler code. This is a slightly advanced setup
and you're expected to be able to understand errors from your compiler or
linker and correct them.