info-inventor-dev
[Top] [All Lists]

Re: how to handle <cmath> and the like ?

To: Kiril Vidimce <vkire@xxxxxxxxx>
Subject: Re: how to handle <cmath> and the like ?
From: Laurent Duflot <duflot@xxxxxxxxxxxx>
Date: Wed, 30 Aug 2000 20:48:45 +0200 (MET DST)
Cc: info-inventor-dev@xxxxxxxxxxx
In-reply-to: <Pine.LNX.4.21.0008301127410.1351-100000@xxxxxxxxxxxxxxxx>
Sender: owner-info-inventor-dev@xxxxxxxxxxx

   KCC cannot swallow mathcalls.h directly: it protests about multiple
overloaded "extern C" functions like acos(float) and acos(double).

   Laurent


On Wed, 30 Aug 2000, Kiril Vidimce wrote:

> On Wed, 30 Aug 2000, Laurent Duflot wrote:
> > in porting to other architectures, how can I handle the use of <cmath> and 
> > the
> > like ? It seems that I need to use them on Linux with the KAI C++ compiler.
> > 
> > 
> > I propose to use 
> > 
> > #ifdef HAS_CSTDLIB
> > #include <cstdlib>
> > #endif
> > 
> > #ifdef HAS_CMATH
> > #include <cmath>
> > #endif
> > 
> > and the HAS_XXXX should be set by the build system. 
> 
> Is this for *trunc() and the like?
> 
> You need to add -D_ISOC99_SOURCE to your compile line to pick up those 
> without any changes to the source code.
> 
> KV
> --
>   ___________________________________________________________________
>   Studio Tools                                        vkire@xxxxxxxxx
>   Pixar Animation Studios                        http://www.pixar.com/
> 
> 


<Prev in Thread] Current Thread [Next in Thread>