| AWARE [SYSTEMS] | Imaging expertise for the Delphi developer | |||||||
![]() |
TIFF and LibTiff Mailing List Archive | |||||||
LibTiff Mailing List
TIFF and LibTiff Mailing List Archive Contact
The TIFF Mailing List Homepage |
2003.06.24 14:09 "Compilation of libtiff with C++ compiler on HP", by Fridiric DelhoumeHi,
Compiling libtiff 3.5.7 on HP platform with aCC3.30 generates lots of
warnings and even some errors.
The errors are due to conversion from pointers to int not allowed.
It is necessary to first cast to a 64 bits type.
Here is an example (file tif_dirwrite.c)
// my modification.
#if defined(__hpux) && defined(__LP64__)
#define HDROFF(f) ((toff_t)(unsigned long) &(((TIFFHeader*) 0)->f))
#else
// original
#define HDROFF(f) ((toff_t) &(((TIFFHeader*) 0)->f))
#endif
Same problem arises in tif_packbits.c
#if defined(__hpux) && defined(__LP64__)
tsize_t rowsize = (tsize_t)(unsigned long) tif->tif_data;
#else
tsize_t rowsize = (tsize_t) tif->tif_data;
#endif
and
#if defined(__hpux) && defined(__LP64__)
rowsize = (tsize_t)(unsigned long) tif->tif_data;
#else
rowsize = (tsize_t) tif->tif_data;
#endif
The other files compile but some have warnings.
I attach a log of the compilation.
Note that some files from the original source might not be present in
the log.
Fridiric
|
|||||||