I've run into a strange problem, and could use some advice. I have a
C++ library that I'm porting from linux to Mac OS X. One of the classes
validates that a floating point number meets certain criteria, i.e. it
must be in the correct value range for the object. The class makes use
of the function isnan as part of the validation. On Mac OS X, this is a
macro defined in /usr/include/architecture/ppc/math.h. You get this
header by simply including math.h in your file.
However, when I compile the library, the linker says that this function
is undefined. I've tried including <architecture/ppc/math.h> directly
and still it doesn't work. I've gone over the include file to see if
something special needs to be defined or undefined to get the macro. I
can't find anything. I tried using namespace std. I've changed the
order of includes in case something else was undefing it.
I had to resort to copying the macro definition from math.h and putting
it into my own header wrapped with an #ifdef (__APPLE__) ... #endif.
Does anyone know what could cause this?