• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Rép : isnan()
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Rép : isnan()


  • Subject: Rép : isnan()
  • From: Sandy Martel <email@hidden>
  • Date: Mon, 12 Jul 2004 10:02:23 -0400

Le 04-07-09, ` 15:59, Bryan Pietrzak a icrit :

How do I use isnan in a project? I'm trying to convert it from CW to
Xcode and can't get the compiler to let this in. I have #include
<math.h> in my pch. And I've turned on C99, but I still get an error
error: `isnan' undeclared (first use this function)

There is a bug in Apple's gcc headers that cause conflict between some headers, for example, this program won't compile:


// test.cpp
#include <math.h>
#include <stdio.h>
#include <iostream>

int main()
{
  if ( isnan( 1.1 ) )
    printf( "true\n" );
}

% g++ test.cpp
test.cpp: In function `int main()':
test.cpp:8: error: `isnan' undeclared (first use this function)
test.cpp:8: error: (Each undeclared identifier is reported only once for each
function it appears in.)


commenting the third line out (include iostream) will make it compile. You have to work around this, maybe using CarbonCore/fp.h like someone said will work...

Sandy.
_______________________________________________
xcode-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/xcode-users
Do not post admin requests to the list. They will be ignored.


  • Follow-Ups:
    • Re: Rép : isnan()
      • From: Bryan Pietrzak <email@hidden>
  • Prev by Date: Couldn't open .xcode project
  • Next by Date: Couldn't generate .bb .bbg file
  • Previous by thread: Couldn't open .xcode project
  • Next by thread: Re: Rép : isnan()
  • Index(es):
    • Date
    • Thread