Overview. --------- This document describes how to compile mupdf natively on Windows. First, the native msvc makefile is meant as a template, not a final product. It only builds statically linked 'pdftool' executable. If you want to incorporate mupdf into your own program, you can use msvc makefile as an example of how to compile the code on Windows with msvc. Mupdf 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.msvc' and you can compile mupdf on command line with: 'nmake -f makefile.msvc CFG=rel' (or CFG=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 'pdftool.exe' in either 'obj-rel' or 'obj-dbg' directory.