将libtiff 4.0.3解压到[工作目录]/tiff/tiff-4.0.3
对于Release,编辑tiff/tiff-4.0.3里面的nmake.opt如下选项,去掉注释:
JPEG_SUPPORT = 1
JPEGDIR = [工作目录]/jpeg/libjpeg
JPEG_INCLUDE = -I$(JPEGDIR)
JPEG_LIB = $(JPEGDIR)/Release/libjpeg.lib
ZIP_SUPPORT = 1
ZLIBDIR = [工作目录]/zlib/install
ZLIB_INCLUDE = -I$(ZLIBDIR)/include
ZLIB_LIB = $(ZLIBDIR)/lib/zlib.lib
PIXARLOG_SUPPORT = 1
OPTFLAGS =/Ox /MT /EHsc /W3 /D_CRT_SECURE_NO_DEPRECATE
LD=link /nologo /MACHINE:x86
DLLNAME= libtiff.dll
对于Debug,按如下编辑:
JPEG_SUPPORT = 1
JPEGDIR = [工作目录]/jpeg/libjpeg
JPEG_INCLUDE = -I$(JPEGDIR)
JPEG_LIB = $(JPEGDIR)/Debug/libjpeg.lib
ZIP_SUPPORT = 1
ZLIBDIR = [工作目录]/zlib/install
ZLIB_INCLUDE = -I$(ZLIBDIR)/include
ZLIB_LIB = $(ZLIBDIR)/lib/zlibd.lib
PIXARLOG_SUPPORT = 1
OPTFLAGS = /Zi /MTd /EHsc
LD=link /nologo /MACHINE:x86 /debug
DLLNAME= libtiff_d.dll
到[工作目录]/tiff/tiff-4.0.3,在Visual Studio 2008命令行里面输入:
nmake /f Makefile.vc
就可以了。