2005.01.30 11:21 "Re: [Tiff] LIBTIFF HEADER by Stefan Dieball", by Sherlog
MICROSOFT VISUAL C++
Maybe someone can help me to enable C++ for opening and reading TIFF files.
If you have a standard source distribution of libtiff then you need to build the .lib/.dll files first and then tell VC++ where the .libs and header files are.
To build: get a command prompt with the VC++ environment variables set. Either pick the appropriate item from the VC++/VS submenu in the Start menu (usually called "Visual Studio Command Prompt" or something like that) or call the VSVars32.bat batch file from an existing cmd prompt. E.g.
| C:\> d:\VS8Beta\Common7\Tools\VSVars32
| Setting environment for using Microsoft Visual Studio 2005 tools.
| (If you have another version of Visual Studio or Visual C++ installed and wish
| to use its tools from the command line, run vsvars32.bat for that version.)
Then go to the directory where you have installed the libtiff source files and run nmake:
| D:\dev\src\misc\tiff-3.7.1> nmake /f Makefile.vc
The master makefile will build all .libs, the .dll and the tools. In the VS project options, add libtiff.lib as an additional link dependency (Linker -> Input -> Additional Dependencies) and add the libtiff subdirectory as an additional include path (C/C++ -> General -> Additional Include Directories). If you have built libtiff.lib with default options then your project must be set to use the dll runtime instead of statically linking the CRT (C/C++ -> Code Generation -> Runtime Library: "Multi-threaded DLL (/MD)").
Sherlog [Personenkennzahl 250866413515 / Stefan Otto / SO1801-RIPE]