Reputation: 23
I am not a regular programmer, but of necessity. I am using the tiff-4.0.3 as part of an upgrade to an xcode program I had running under MacOS 10.5
When I build, I get the error message:
Conflicting types for 'uint64'
The line that is flagged is located in tiff.h and reads:
typedef TIFF_UINT64_T uint64;
The only other line I can find in the project with TIFF_UINT64_T is located in tiffconf.h and reads:
/* Unsigned 64-bit type */
#define TIFF_UINT64_T unsigned long
In any case, the error makes no sense to me. There are a large number of similar definitions, none of which flag the same error. Is it possible that the library libtiff.la has a conflicting definition? Is there any way to check this? I cannot get NM or otool to reveal what is in the library.
Other than that, I am at a loss on where to look. I have done the configure/make/install several times in case it is some omission in the process, but to no avail.
Upvotes: 2
Views: 2835
Reputation: 304
To me this looks like a bad coding practice in both libtiff
and Apple libraries which define this type.
The type uint64
is defined in /System/Library/Frameworks/Security.framework/Headers/cssmconfig.h
for example.
Probably the best way to fix this is to patch libtiff
to use uint64_t
instead of unsigned long
.
(I submitted a bug report to http://bugzilla.maptools.org/show_bug.cgi?id=2464.)
Upvotes: 0
Reputation: 179442
typedef TIFF_UINT64_T uint64;
This defines a new type called uint64
. However, it is very likely that another library you are using defines uint64
, since it is quite a common type name.
Try asking Xcode to show you the definition of uint64
after commenting out an #include
for tiff.h
, to see where else it is defined.
The types likely conflict because uint64
is usually defined as unsigned long long
(or some variation on that), and this line defines uint64
as unsigned long
. (Whether that is correct or not depends on the compiler settings, but it is not the same as unsigned long long
).
Upvotes: 5