2020.01.18 21:32 "Re: [Tiff] Warnings while building tools", by Bob Friesenhahn
I built libtiff 4.10 on Windows using Microsoft's Visual Studio nmake.
I encountered a small glitch with the tiffset tool, which wouldn't build, complaining that 'strtoll' was undefined. After some web search I solved this by replacing 'strtoll' with '_strtoi64' in 'tiffset.c'. After this, all wen well.
There are porting functions in the 'port' subdirectory. If you use cmake or Unixish 'configure' then the correct porting functions will be automatically used.
It looks like you are expected to first build the library in the 'port' directory (based on copying 'Makefile.vc' to 'Makefile'), before building the libtiff library in the libtiff directory (also based on copying 'Makefile.vc' to 'Makefile').
The nmake-based build is not as well maintained as it could be since none of the libtiff developers use it. The features provided by Visual Studio depend on version, so some manual tailoring is likely required.
Some of the tools, although they build successfully, keep giving many warnings of the kind "conversion from 'tsize_t' to 'uint32', possible loss of data", "conversion from 'uint64' to 'uint32', possible loss of data", and so on.
The tools giving the warnings are 'tiff2pdf' (20 warnings), 'tiff2ps' (3 warnings), 'tiffcp' (15 warnings), and 'tiffcrop' (45 warnings). I use the first three in the post-processing of scanned images, and the "possible loss of data" part concerns me somewhat.
What could be done to correct the issues generating those warnings?
Under Windows the 'long' type does not track the size of the 'size_t' type as it usually does on other operating systems. In a 64-bit build, the 'long' type remains 32 bits while the 'size_t' type becomes 64-bit. This means that code mixing 'long' and 'size_t' is likely to produce warnins.
Some of these warnings may indicate that you can't get the full possible capacity (e.g. extremely large files), or they may just be unimportant annoyances.
The developers have not attended to the tiff utilities under Windows as much as should be. Most of the focus has been on making libtiff itself as correct as possible.
GraphicsMagick Maintainer, http://www.GraphicsMagick.org/
Public Key, http://www.simplesystems.org/users/bfriesen/public-key.txt