Question

I'm currently trying to saving tif format image with a size larger than 4GB. So I'm trying to set up bigtiff(libtiff 4.1) from bigtiff.org. However, I can't compile it no matter using nmake or vs2012. Using nmake, it have no nmake.opt. Using vs2012, it cannot be compiled into a dll. Errors will be as below:

1>tif_codec.obj : error LNK2001: unresolved external symbol TIFFInitPixarLog 
1>tif_codec.obj : error LNK2001: unresolved external symbol TIFFInitZIP 
1>tif_codec.obj : error LNK2001: unresolved external symbol TIFFInitJPEG

Does anyone know how to set up bigtiff?

Was it helpful?

Solution

I would suggest building using nmake - I have found that this works better than using Visual Studio (I'm using Visual Studio 2008). I would also suggest downloading the latest version from http://www.remotesensing.org/libtiff/, the official website for libtiff. This version includes BigTIFF support. This should also include a sample nmake.opt file that you may have to edit to point at your libtiff and libz libraries. If you do not require support for JPEG, ZIP, or Pixar you should be able to disable these in the nmake.opt file. Below are a few lines from the nmake.opt that I use:

#
# Uncomment and edit following lines to enable JPEG support.
#
JPEG_SUPPORT = 1
JPEGDIR = C:/libjpeg-turbo
JPEG_INCLUDE = -I$(JPEGDIR)/include
JPEG_LIB = $(JPEGDIR)/lib/jpeg-static.lib

#
# Uncomment and edit following lines to enable ZIP support
# (required for Deflate compression and Pixar log-format)
#
ZIP_SUPPORT = 1
ZLIBDIR = D:/zlib-1.2.7
ZLIB_INCLUDE = -I$(ZLIBDIR)
ZLIB_LIB = $(ZLIBDIR)/build/Release/zlibstatic.lib

The missing symbols, if I recall correctly, are found in tif_pixarlog.c, tif_jpeg, and tif_zip respectively. You may want to check for the presence of these files.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top