AWARE SYSTEMS
TIFF and LibTiff Mail List Archive

Thread

2004.07.28 20:00 "[Tiff] Building libtiff 3.7 with zlib 1.2.1 for windows with Visual CPP", by Larry Grill
2004.07.29 17:37 "Re: [Tiff] Building libtiff 3.7 with zlib 1.2.1 for windows with Visual CPP", by Andrey Kiselev

2004.07.28 20:00 "[Tiff] Building libtiff 3.7 with zlib 1.2.1 for windows with Visual CPP", by Larry Grill

Hi all,

This applies to building libtiff 3.7 (or 3.6.1) with zlib 1.2.1 for windows with Visual CPP

I could not get the libtiff.dll or the tools exes to build when linking in zlib 1.2.1

It worked fine with zlib 1.1.4, but with 1.2.1 I got linker errors from MSVCRT.LIB

In case anyone else is having the same problem, here's how to fixed it:

In nmake.opt
Change:
LD = link /nologo
To
LD = link /nologo /NODEFAULTLIB:"MSVCRT.LIB"

In Makefile.vc (in the Tools directory)
Change:
$(CC) $(CFLAGS) $*.c $(EXTRA_OBJ) $(LIBS)
To:

$(CC) $(CFLAGS) $*.c /link /NODEFAULTLIB:"MSVCRT.LIB" $(EXTRA_OBJ) $(LIBS)

I'm not much of a batch file and command line kind of guy, so maybe Andrey or somebody else can do a better job of it. You'll probably want the conditional control statements for ZLIB support in there.

Larry M. Grill
larry@nuglyphix.com
www.nuglyphix.com