This log shows how I created updated, NETPBM 10.47.45, versions of jpegtopnm.exe and pnmtojpeg.exe for MS Windows. Install mingw using default initial installer: C, MSYS, C++, etc. Creates folder /home/dommelen below MinGW/MSYS/1.0. Unzip jpeg-6b, netpbm-10.47.45 into it. Open MinGW command terminal window from start menu. cd jpeg-9 ./configure Edit file jconfig.h and add to it (compare jconfig.dj): #undef TWO_FILE_COMMANDLINE #define USE_SETMODE Next: make Above works without problems. Copy the cjpeg, djpeg, jpegtran elsewhere for adding to the Windows distribution. Next: cd ../netpbm-10.47.45 ./configure win not gnu, djgpp ... static instead of shared ... /home/dommelen/jpeg-9/.libs/libjpeg.a ... cd converter/other make jpegtopnm make pnmtojpeg *Seems* to work. Unfortunately it did not. After contacting netpbm coordinator Bryan Henderson, he very kindly examined the problem and gave me two new versions of pm.config.h and common.mk that fixed the problem. (I put them in my netpbm-10.47.45.zip file as pm.config.h.NEW and common.mk.NEW.) After I replaced the original two files by those, things worked like a charm. jpegtopnm and pnmtojpeg in the MS Windows distribution are now the 10.47.45 ones. That includes the jpegtopnm -repair option. NOTE: djpeg, cjpeg, jpegtran, jpegtopnm and pnmtojpeg in the MS Windows distribution are based on jpeg-9 and netpbm 10.47.45. The rest, including ppmtojpeg (a rename of pnmtojpeg), are based in jpeg-6b and netpbm 10.6.1. NOTE: For jpeg-9, unlike jpeg-6b, libjpeg.a is in the .libs subfolder.