This is an old revision of the document!

LipJpeg for Windows, How to compile

Available prebuilt libraries

All prebuilt libraries are available in the php-libs repositories

The filename format is:

where x.y.z defines the version, vcversion which Visual C++ has been used.

Only static library (.lib) are available for now.

Building libjpeg 8d


  • LibJpeg Sources, fetch our patched (see below) version or the original [[|sources]
  • Common tools used to compile PHP

Preparing the sources

To compile libjpeg to be used with PHP (and more generally with any decent VC), the makefile has to be altered, add the /MT flag as follow (~ line 15):

CFLAGS= $(cflags) $(cdebug) $(cvars) -I. /MD


 copy jconfig.h


Two modes are available, debug or non debug (fully optimized).



nmake /f nodebug=1


nmake /f

For VC11 you might need to copy the win32.mak from the Windows SDK file into the jpeg source dir.

internals/windows/libs/libjpeg.1359458516.txt.gz · Last modified: 2017/09/22 13:28 (external edit)