POV-Ray : Newsgroups : povray.unix : Header precomp.h and precomp.cpp files issue. Server Time: 30 Mar 2020 13:29:16 GMT
  Header precomp.h and precomp.cpp files issue. (Message 1 to 3 of 3)  
From: William F Pokorny
Subject: Header precomp.h and precomp.cpp files issue.
Date: 19 Mar 2020 14:42:58
Message: <5e7384f2$1@news.povray.org>
Documenting something I see for whoever might trip over it later.

I've been working toward a cut down *nix only 'povray'. We today have 
precomp.h and precomp.ccp files which look to be trying to precompile 
common c/c++ headers for faster developer compiles. As set up this 
mechanism does not work for *nix compiles. We get an 'empty' precomp.o 
in each directory which is more or less harmless except for a little 
compile time and...

Supposing the precomp.h and precomp.ccp mechanism does work with windows 
compiles, it might explain why, back when Christoph added the user 
defined camera for the ODS camera work we hit that *nix only issue with 
abs() not resolving to fabs(). I've since had this itch we might have 
floating about similar *nix particular exposures due header inclusion 
order(1).

Bill P.

(1) - Potentially where, in the code, not using std::<function> 
namespace names.


Post a reply to this message

From: jr
Subject: Re: Header precomp.h and precomp.cpp files issue.
Date: 20 Mar 2020 10:30:00
Message: <web.5e749a01a940f797451952ca0@news.povray.org>
hi,

William F Pokorny <ano### [at] anonymousorg> wrote:
> Documenting something I see for whoever might trip over it later.
>
> I've been working toward a cut down *nix only 'povray'. We today have
> precomp.h and precomp.ccp files ... I've since had this itch we might have
> floating about similar *nix particular exposures due header inclusion
> order(1).
>
> Bill P.
>
> (1) - Potentially where, in the code, not using std::<function>
> namespace names.

pardon my ignorance but would that problem not .. disappear if, instead of
importing, all names were given fully qualified?  (ie with namespace)


regards, jr.


Post a reply to this message

From: William F Pokorny
Subject: Re: Header precomp.h and precomp.cpp files issue.
Date: 20 Mar 2020 15:52:07
Message: <5e74e6a7@news.povray.org>
On 3/20/20 6:25 AM, jr wrote:
...
>> precomp.h and precomp.ccp files ... I've since had this itch we might have
>> floating about similar *nix particular exposures due header inclusion
>> order(1).
...
>> (1) - Potentially where, in the code, not using std::<function>
>> namespace names.
> 
> pardon my ignorance but would that problem not .. disappear if, instead of
> importing, all names were given fully qualified?  (ie with namespace)
> 
Yep, fully qualified everywhere would close the exposure I think. 
Christoph was making changes in that direction - though his work might 
have been driven more by header re-work than my *nix specific worry.

Converting explicit std::<?>abs uses to std::abs and the like probably 
good to do too with care. Occasionally the aim might be to force certain 
input types / or to do indirect type conversions via a more specific 
function working on and returning certain types.

Bill P.


Post a reply to this message

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