POV-Ray : Newsgroups : povray.unix : error in base/image/hdr.cpp : Re: error in base/image/hdr.cpp Server Time
22 Feb 2024 00:07:07 EST (-0500)
  Re: error in base/image/hdr.cpp  
From: Le Forgeron
Date: 12 May 2017 14:45:43
Message: <591602d7$1@news.povray.org>
Le 12/05/2017 à 15:00, crystal a écrit :
> I am trying to install povray-3.7-stable version in fedora.
> ../configure --prefix=/usr/scratch1/nath/POVRAY
> --withboost-libdir=/usr/scratch1/nath/BOOST/lib
> --with-libtiff=/usr/scratch1/nath/TIFF/lib
> is working fine. Then when I am trying to install (make check or make install)
> it, it is giving this following error>>>>>>>

> base/image/hdr.cpp: In function ‘void pov_base::HDR::ReadOldLine(unsigned char*,
> int, pov_base::IStream*)’:
> base/image/hdr.cpp:147:12: error: no match for ‘operator==’ (operand types are
> ‘pov_base::IStream’ and ‘bool’)
>    if(*file == false)
>       ~~~~~~^~~~~~~~

Your compiler is enforcing the modern rules of C++...
and without a cast operator, an object cannot be compared to a boolean.

Have a look at
for a fast patch (one more line) to be fine.

Alternative would be to replace all "XXXXX == false" with "!XXXXX" but
it is far more heavy and make code less readable (but works, because
operator!() is defined in code).

Best regards :-)

Post a reply to this message

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