Search code examples
c++visual-studiotifflibtiff

Using LibTIFF for C++ in Visual Studio 2019 Windows


I am trying to use the LibTIFF library in a C++ Visual Studio 2019 project, so far without success. Building the library is no problem and leaves me with both a "tiff.lib" and a "tiff.dll".

Since i only need them for this project, i haven't done any linking or added them to PATH - the files and their folder are however referenced in the Visual Studio config under "Linker/Additional Dependencies" and "Linker/Additional Libraries" respectively.

The declarations i need should be available by using #include <tiffio.h> or #include "tiffio.h", which currently only give me the error "File Source Cannot be Opened"

How do i add the functionality of this library to my Project?

The following questions are related but only cover the build process: Using LibTiff in Visual Studio 2010 Installing LibTiff to Visual Studio 2010


Solution

  • Installing vcpkg and then using vcpkg install tiff installs the LibTIFF library and allows you(me) to import the TIFF functions to any c/c++ project. This also skips the need for building the library.

    Thanks at @doug for this solution