2014-02-07 148 views
0

我正在嘗試保存尺寸大於4GB的tif格式圖像。所以我試圖從bigtiff.org建立bigtiff(libtiff 4.1)。但是,無論使用nmake還是vs2012,我都無法編譯它。使用nmake,它沒有nmake.opt。使用vs2012,它不能編譯成dll。錯誤將如下:如何設置bigtiff?

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 

有誰知道如何設置bigtiff?

+0

也許發佈編譯器輸出? –

+0

1> tif_codec.obj:錯誤LNK2001:解析外部符號TIFFInitPixarLog 1> tif_codec.obj:錯誤LNK2001:解析外部符號TIFFInitZIP 1> tif_codec.obj:錯誤LNK2001:解析外部符號TIFFInitJPEG – user3284701

+0

當與編譯VS2010,這些錯誤以上發生。 – user3284701

回答

0

我會建議使用nmake構建 - 我發現這比使用Visual Studio更好(我使用Visual Studio 2008)。我也建議從http://www.remotesensing.org/libtiff/,libtiff的官方網站下載最新版本。該版本包含BigTIFF支持。這應該還包括一個示例nmake.opt文件,您可能需要編輯它以指向libtiff和libz庫。如果您不需要對JPEG,ZIP或Pixar的支持,則應該能夠在nmake.opt文件中禁用它們。下面是從nmake.opt幾行,我用:

# 
# 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 

丟失的符號,如果我沒有記錯,在tif_pixarlog.c,tif_jpeg和tif_zip分別被發現。您可能需要檢查這些文件的存在。