当我尝试使用
运行脚本时#include "libtiff.h"
编译时,编译器给我带来了LibTiff库其余部分中使用的UINT和INT数据类型的种种麻烦。
In file included from H:\tiff-4.0.9\libtiff\tiffio.h:33:0,
from savetiff.cpp:1:
H:\tiff-4.0.9\libtiff\tiff.h:68:27: error: expected initializer before 'int8'
typedef int TIFF_INT8_T int8;
H:\tiff-4.0.9\libtiff\tiff.h:69:36: error: expected initializer before 'uint8'
typedef unsigned int TIFF_UINT8_T uint8;
H:\tiff-4.0.9\libtiff\tiff.h:71:27: error: expected initializer before 'int16'
typedef int TIFF_INT16_T int16;
H:\tiff-4.0.9\libtiff\tiff.h:72:36: error: expected initializer before 'uint16'
typedef unsigned int TIFF_UINT16_T uint16;
H:\tiff-4.0.9\libtiff\tiff.h:74:27: error: expected initializer before 'int32'
typedef int TIFF_INT32_T int32;
H:\tiff-4.0.9\libtiff\tiff.h:75:36: error: expected initializer before 'uint32'
typedef unsigned int TIFF_UINT32_T uint32;
H:\tiff-4.0.9\libtiff\tiff.h:77:27: error: expected initializer before 'int64'
typedef int TIFF_INT64_T int64;
H:\tiff-4.0.9\libtiff\tiff.h:78:36: error: expected initializer before 'uint64'
typedef unsigned int TIFF_UINT64_T uint64;
除了进入每个错误消息(有一吨)并单独修复所有问题之外,是否有人知道如何解决此问题?顺便说一下,我正在使用Ubuntu。
谢谢!