Try moving the following code :

#if defined(__MINGW32__)
#define isnan(x) _isnan(x)
#endif

**after**

#include "cloud.hxx"

-Fred


----- Original Message ----- 
From: "Giles Robertson" 


Unfortunately not:
Making all in clouds3d
cloud.cxx:31:1: warning: "isnan" redefined
In file included from cloud.cxx:22:
c:/files/mingwin/mingw/include/math.h:324:1: warning: this is the
location of the previous definition
cloud.cxx: In member function `bool SGCloudLayer::reposition(float*,
float*, 
   double, double, double, double)':
cloud.cxx:712: `isnan' undeclared (first use this function)
cloud.cxx:712: (Each undeclared identifier is reported only once for
each 
   function it appears in.)
make[5]: *** [cloud.o] Error 1
make[4]: *** [all-recursive] Error 1
make[3]: *** [all-recursive] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all] Error 2
make: *** [all-recursive] Error 1

I deleted my local copy and grabbed it fresh off CVS because of a
conflict.

What I can't follow is why it first complains that isnan has been
redefined, and then complains that isnan is now undefined. 

It then compiles clean when you muck around with clouds.cxx like this
(lies 30-33)

#if defined(__MINGW32__)
inline int (isnan)(double r) { return isnan(r); }
#endif

Diff:
31c
inline int (isnan)(double r) { return isnan(r); }

Still don't understand what the problem is, though.


Giles Robertson
[EMAIL PROTECTED]


-----Original Message-----
From: Frederic Bouvier [mailto:[EMAIL PROTECTED] 
Sent: 21 May 2004 16:14
To: FlightGear developers discussions
Subject: Re: [Flightgear-devel] SimGear compile error

Giles Robertson wrote:

> This was sorted out by uncommenting lines 28&29 of cloud.cxx:
> 
> // #if defined (__APPLE__) 
> // // any C++ header file undefines isinf and isnan
> // // so this should be included before <iostream>
> inline int (isinf)(double r) { return isinf(r); } //See below
> inline int (isnan)(double r) { return isnan(r); } //HACK to make MingW
> MsyS build work. Find better solution ASAP. May well break other
> systems.
> // #endif
> 
> (I added the end of line comments)
> SimGear now compiles, but this is hardly a good solution. Does anybody
> know what's going on here? Why is isnan() being undefined?
> 
> I have a feeling this may have come up before, but I can't find it in
> the archives, or remember the solution.

Should be fixed now.

-Fred



_______________________________________________
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel

_______________________________________________
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel



_______________________________________________
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel

Reply via email to