2016.07.13 22:07 "[Tiff] Visual Studio 2012: snprintf problem when linking with libtiff.lib", by Bart Vandewoestyne

2016.07.14 13:20 "Re: [Tiff] Visual Studio 2012: snprintf problem when linking with libtiff.lib", by Bob Friesenhahn

The source file port/snprintf.c is supposed to provide a snprintf replacement (_TIFF_snprintf_f()) when the MSVC runtime is not sufficient. This means it needs to be included in the build.

Are you saying that in this case, next to linking with libtiff.lib, it is indeed necessary to also link with libport.lib (as I was guessing)?

Yes, it seems like it.

Oh, and by the way: how is 'not sufficient' defined for the MSVC runtime? When do we fallback to _TIFF_snprintf_f()?

This associated code appears in tiffiop.h:

#if !defined(HAVE_SNPRINTF) && !defined(HAVE__SNPRINTF)
#undef snprintf
#define snprintf _TIFF_snprintf_f

extern int snprintf(char* str, size_t size, const char* format, ...); #endif

so HAVE_SNPRINTF is driving this.

Bob
--
Bob Friesenhahn
bfriesen@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer, http://www.GraphicsMagick.org/