This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: cmath, math.h, and isnan
- From: Bob Rossi <bob at brasko dot net>
- To: Wesley Smith <wesley dot hoke at gmail dot com>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Mon, 23 May 2005 11:35:20 -0400
- Subject: Re: cmath, math.h, and isnan
- References: <1079b0505052308322fb0ebc6@mail.gmail.com>
On Mon, May 23, 2005 at 08:32:13AM -0700, Wesley Smith wrote:
> Hi,
>
> I'm trying to compile some image processing software that uses isnan.
> I'm using gcc 3.3 on os x, so (as was pointed out earlier) the c99
> extensions aren't in c++ yet. Thus, when I include on cmath I get a
> 'isnan' undeclared error. The same goes for when I include both cmath
> and math.h. When I just include math.h however isnan is defined and I
> can compile.
>
> In compiling this software, I need to somehow figure out how to use
> both the isnan from math.h and cmath for the other functions defined
> there in the same header file but not have them conflict. Are there
> any compiler settings of macros that can be used to do this?
At a bare minimum, you could include each header in a separate file, and
then write wrappers for the functions you want to call. This would at
least be a temporary work around.
Bob Rossi