2020.01.21 20:03 "Re: [Tiff] Warnings while building tools", by Roger Leigh
On 21/01/2020 19:23, firstname.lastname@example.org wrote:
at least I am using the nmake / Makefile.vc feature for years within a Visual Studio /Windows environment, together with the same nmake / Makefile.vc feature of GeoTiff. The libtiff.lib and geotiff.lib are built easily with native Visual Studio tools, without the need to install any third party tools. Just call “nmake /f Makefile.vc” and that’s it.
Which third party tools would I have to install and what would be the call sequence on a standard Windows 10 with MS Visual Studio (e.g. 2015)?
Install CMake, thenin a Visual Studio command prompt window, or other environment with cl and cmake on the PATH:
cmake -G "NMake Makefiles".
to configure and generate the Makefile, and then
to build and optionally install. It has all the usual targets provided.
The advantage of this over the Makefile.vc is that it introspects the system and adapts the build to suit it, just like the Autotools do on Unix platforms. Additionally, various options are configurable, so you can choose to build with support for various features, compression codecs etc. which the static Makefile.vc can't support. Use -Ooption=value to set them. Or "cmake -LH" to list all the configuration options. cmake-gui lets you edit them interactively. As an example relevant to this discussion, VS2019 supports strtoll and strtoull, so if you configure with this version of MSVC, you should get the native CRT functions used automatically, not the compatibility reimplementations.