POV-Ray : Newsgroups : povray.unix : PovRay-3.7.0.RC7 make error. : Re: PovRay-3.7.0.RC7 make error. Server Time
27 Apr 2024 19:08:59 EDT (-0400)
  Re: PovRay-3.7.0.RC7 make error.  
From: clipka
Date: 17 Mar 2013 09:19:44
Message: <5145c2f0@news.povray.org>
Am 17.03.2013 11:01, schrieb Rubid:

>> Anyway, I have some hunch. Can you try replacing all occurrences of
>> "true" with "TRUE" in the file "image/jpeg.cpp"?
>
> Thanks clipka!
> It worked like a charm! Can you tell me how did you figure it out?

Well, the error messages indicated that there was a problem with 
conversion between the C++ standard data type "bool" and some other 
non-standard data type named "boolean" in the file "image/jpeg.cpp", 
which is the POV-Ray code that calls the jpeg library to read and write 
JPG image files.

It was prudent to assume that the "boolean" data type was defined by the 
jpeglib, as it's a plain C library, and C does not have the "bool" type. 
I searched the jpeglib code for "boolean" to find out how the type is 
defined, and found one location where it is defined as "unsigned char"; 
however, a comment in that piece of code indicated that this definition 
was only used on Windows systems, so I followed some breadcrumbs and 
found another definition that would be used on non-Windows systems; this 
one defined the "boolean" type as an enumeration, with two values named 
"FALSE" and "TRUE". At that same location I also found code that would 
again be used on Windows systems, which would define two macros "FALSE" 
and "TRUE".

 From what I found, I concluded that the proper "yes" value to pass into 
a "boolean" type would be "TRUE" (both on Windows and Unix systems), 
while the fact that "true" also worked fine on many systems could be 
considered a mere coincidence.

> For those who have the same problem:
> sed "s/true/TRUE/g" jpeg.cpp > jpeg.cpp

The fix will also be included in the 3.7.0 release proper.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.