2007.06.28 12:37 "[Tiff] Problems Building libtiff under Windows XP", by Kevin Myers

Hi Folks,

Years ago I was able to successfully build libtiff under Windows, but that has been too long ago, and I have forgotten whatever tricks might have been needed. I don't build applications very often, so I may be doing something pretty dumb...

Anyway, when I start building libtiff (using nmake /f makefile.vc), the first thing that looks strange is a bunch of messages similar to the following:

cl /nologo /Ox /MD /GX /W3 -I. -Ic:/GnuWin32/include -DAVOID_WIN32_FILEIO -DCHECK_JPEG_YCBCR_SUBSAMPLING -DDEFAULT_EXTRASAMPLE_AS_ALPHA -DSTRIPCHOP_DEFAULT=TIFF_STRIPCHOP -DSTRIP_SIZE_DEFAULT=8192 -DPIXARLOG_SUPPORT -DZIP_SUPPORT -DJPEG_SUPPORT -DLOGLUV_SUPPORT -DNEXT_SUPPORT -DTHUNDER_SUPPORT -DLZW_SUPPORT -DPACKBITS_SUPPORT -DCCITT_SUPPORT -DTIF_PLATFORM_CONSOLE -DFILLODER_LSB2MSB /c tif_aux.c tif_aux.ctif_aux.c(105): warning C4273: 'TIFFVGetFieldDefaulted': inconsistent dll linkage. dllexport assumed.

tif_aux.c(257) : warning C4273: 'TIFFGetFieldDefaulted' : inconsistent dll linkage.  dllexport assumed.

I don't know whether those messages are really a problem or not (similar messages are produced for almost every source file that is compiled).

But then I get a little further and see this, which doesn't look too promising:

cl /nologo /Ox /MD /GX /W3 -I. -Ic:/GnuWin32/include -DAVOID_WIN32_FILEIO -DCHECK_JPEG_YCBCR_SUBSAMPLING -DDEFAULT_EXTRASAMPLE_AS_ALPHA -DSTRIPCHOP_DEFAULT=TIFF_STRIPCHOP -DSTRIP_SIZE_DEFAULT=8192 -DPIXARLOG_SUPPORT -DZIP_SUPPORT -DJPEG_SUPPORT -DLOGLUV_SUPPORT -DNEXT_SUPPORT -DTHUNDER_SUPPORT -DLZW_SUPPORT -DPACKBITS_SUPPORT -DCCITT_SUPPORT -DTIF_PLATFORM_CONSOLE -DFILLODER_LSB2MSB /c tif_getimage.c tif_getimage.c

tif_getimage.c(74) : warning C4273: 'TIFFRGBAImageOK' : inconsistent dll linkage.  dllexport assumed.

tif_getimage.c(191) : warning C4273: 'TIFFRGBAImageEnd' : inconsistent dll linkage.  dllexport assumed.
tif_getimage.c(223) : warning C4273: 'TIFFRGBAImageBegin' : inconsistent dll linkage.  dllexport assumed.
tif_getimage.c(443) : warning C4273: 'TIFFRGBAImageGet' : inconsistent dll linkage.  dllexport assumed.

tif_getimage.c(464) : warning C4273: 'TIFFReadRGBAImageOriented' : inconsistentdll linkage.  dllexport assumed.
tif_getimage.c(489) : warning C4273: 'TIFFReadRGBAImage' : inconsistent dll linkage.  dllexport assumed.
tif_getimage.c(2048) : warning C4550: expression evaluates to a function which is missing an argument list
tif_getimage.c(2049) : warning C4550: expression evaluates to a function which is missing an argument list
tif_getimage.c(2050) : warning C4550: expression evaluates to a function which is missing an argument list
tif_getimage.c(2051) : warning C4550: expression evaluates to a function which is missing an argument list
tif_getimage.c(2052) : warning C4550: expression evaluates to a function which is missing an argument list
tif_getimage.c(2053) : warning C4550: expression evaluates to a function which is missing an argument list
tif_getimage.c(2089) : warning C4550: expression evaluates to a function which is missing an argument list
tif_getimage.c(2452) : warning C4273: 'TIFFReadRGBAStrip' : inconsistent dll linkage.  dllexport assumed.
tif_getimage.c(2503) : warning C4273: 'TIFFReadRGBATile' : inconsistent dll linkage.  dllexport assumed.

Finally, things go completely to the dogs while attempting to compile tif_jpeg.c:

        cl /nologo /Ox /MD /GX /W3 -I. -Ic:/GnuWin32/include -DAVOID_WIN32_FILE
IO -DCHECK_JPEG_YCBCR_SUBSAMPLING -DDEFAULT_EXTRASAMPLE_AS_ALPHA -DSTRIPCHOP_DEF
AULT=TIFF_STRIPCHOP -DSTRIP_SIZE_DEFAULT=8192 -DPIXARLOG_SUPPORT -DZIP_SUPPORT -
DJPEG_SUPPORT -DLOGLUV_SUPPORT -DNEXT_SUPPORT -DTHUNDER_SUPPORT -DLZW_SUPPORT -D
PACKBITS_SUPPORT -DCCITT_SUPPORT -DTIF_PLATFORM_CONSOLE -DFILLODER_LSB2MSB /c t
if_jpeg.c
tif_jpeg.c
c:/GnuWin32/include\jpeglib.h(95): error C2061: syntax error: identifier 'UINT16'
c:/GnuWin32/include\jpeglib.h(102): e6e