2005.06.21 16:10 "Re: [Tiff] VS7.1 compile problems", by Edward Lam
Problem 1: There is something flaky about the handling of the inline declaration in tif_fax3.c functions find0span and find1span. I had to comment out the word "inline" on lines 779 and 838 to get the file to compile.
VC++ uses '__inline' so adding the define
#define inline __inline
should fix the compile problem. Of course this needs to be conditional on the compiler.
Isn't this because we're trying to compile that file as C code as opposed to C++ code? The "inline" keyword is available in the C++ language only. What do we do with gcc? Does gcc erroneously allow the "inline" keyword in the C language?
I think a more semantically correct fix would be:
#if defined(__cplusplus)
// use prototype with inline
#else
// use prototype without inline
#endif
Regards,
-Edward