# build for Visual C++ 2008 / 9.0 > unzip "path\to\jpegsr7.zip" # I want it in jpeg\src for safe keeping > mkdir jpeg > move jpeg-7 jpeg\src # use the corresponding .vcX files for version > copy makeasln.vc9 apps.sln > copy makejsln.vc9 jpeg.sln > copy makewvcp.vc9 wrjpgcom.vcproj > copy maketvcp.vc9 jpegtran.vcproj > copy makervcp.vc9 rdjpgcom.vcproj > copy makedvcp.vc9 djpeg.vcproj > copy makecvcp.vc9 cjpeg.vcproj > copy makejvcp.vc9 jpeg.vcproj > copy jconfig.vc jconfig.h # I'm using vcbuild, since I read .vcproj files in vim; you may want the IDE > vcbuild /nologo jpeg.sln "Release|Win32" ... > vcbuild /nologo apps.sln "Release|Win32" # I put compiler specific files in a suitable folder > mkdir ..\msvc > copy Release\jpeg.lib ..\msvc # jconfig.h is compiler specific, so we dump it in our compiler directory > copy jconfig.h ..\msvc\ > del jconfig.h
# build for MinGW/MSys $ pushd /C/DevFiles/Libraries/jpeg/ $ pushd src # works for most packages $ ./configure --prefix=/C/DevFiles/Libraries/jpeg/ --exec-prefix=/C/DevFiles/L ibraries/jpeg/mingw/ $ make $ make install # move jconfig out of independent include and into compiler specific dir $ mv ../include/jconfig.h
Now copy jerror.h, jinclude.h, jmorecfg.h, jpegint.h, and jpeglib.h into ../include/. Those are the portable headers, that won't very based on compiler (MinGW/MSVC).
and here's my notes file:
MinGW -> static link as normal
MinGW -> Use import library libjpeg.dll.a for dynamic linking with libjpeg-7.dll
MinGW -> Last build JPEG-7 on 2009-12-24
MSVC -> Can only static link agaisnt jpeg.lib; must use /MD
MSVC -> also add msvc/ to include path, for jconfig.h
MSVC -> Last build JPEG-7 on 2009-12-23
In all cases, add include + compiler folders to your include path.