POV-Ray : Newsgroups : povray.general : pov source gcc3 problem : Re: pov source gcc3 problem Server Time
5 Aug 2024 20:20:23 EDT (-0400)
  Re: pov source gcc3 problem  
From: Bob Jamison
Date: 2 Aug 2002 17:25:38
Message: <3D4AF8A0.3050100@lincom-asg.com>
Christian Parpart wrote:
> HI all,
> 
> well, that's the time where I hate my fucking new system :(sorry:)
> But it is as it is. I can't just unzip configur and compile the sources 
> because of some basic C++ standard issues. such as max and std::max. gcc 
> has been very loosely to the ANSI/ISO C++ standard in gcc 2.x. Most of 
> these issues has been fixed now and, what's now? lots of sources (such as 
> povray) can't be compiled.
> 
> That's now good :(
> 
> Will the developer fix that? or do we need to walk through the code and add 
> the namespace prefix (std::) to each standard function? This wouldn't be 
> nice since I'm pretty sure that I'm not the only one who should do exactly 
> the same as the others in that case.
> 
> Thanks,
> Christian Parpart.


Christian,

This simple thing works until that issue is fixed.
Put these lines in config.h:


#ifndef max
#define max(a,b) ( a > b ? a : b )
#endif
#ifndef min
#define min(a,b) ( a < b ? a : b )
#endif



This is easier than searching & prefacing all max
and min calls with std:: ,  eh?   ;-)





Bob Jamison
LinCom Corp


Post a reply to this message

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