I have gotten back to updating FlightGear for MacOS X 10.3 and it appears as if there is a problem with isnan().

source='cloud.cxx' object='cloud.o' libtool=no \
depfile='.deps/cloud.Po' tmpdepfile='.deps/cloud.TPo' \
depmode=gcc3 /bin/sh ../../../depcomp \
g++ -DHAVE_CONFIG_H -I. -I. -I../../../simgear -I../../.. -I/sw/include -g -O2 -D_REENTRANT -c -o cloud.o `test -f 'cloud.cxx' || echo './'`cloud.cxx
cloud.cxx: In member function `bool SGCloudLayer::reposition(float*, float*,
double, double, double, double)':
cloud.cxx:373: error: `isnan' undeclared (first use this function)
cloud.cxx:373: error: (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


For some reason, when <iostream> is included, it messes with the #include of <math.h> by undefining isnan(0, no matter the order of the include.

In order for me to get cloud.cxx to build, I had to add the following lines after the #include of math.h


#if defined (__APPLE__) #define isnan(x) (0) #endif

As far as I can tell, isnan() is defined via math.h, but as soon as I include iostream things go south. I'm sure that this will cause me some problems in the future, but at least I have a build.

Jonathan Polley


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

Reply via email to