public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* cmath, math.h, and isnan
@ 2005-05-23 15:32 Wesley Smith
  2005-05-23 15:35 ` Bob Rossi
  0 siblings, 1 reply; 2+ messages in thread
From: Wesley Smith @ 2005-05-23 15:32 UTC (permalink / raw)
  To: gcc-help

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?

thanks,
wes

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: cmath, math.h, and isnan
  2005-05-23 15:32 cmath, math.h, and isnan Wesley Smith
@ 2005-05-23 15:35 ` Bob Rossi
  0 siblings, 0 replies; 2+ messages in thread
From: Bob Rossi @ 2005-05-23 15:35 UTC (permalink / raw)
  To: Wesley Smith; +Cc: gcc-help

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-05-23 15:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-05-23 15:32 cmath, math.h, and isnan Wesley Smith
2005-05-23 15:35 ` Bob Rossi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).