Tuesday, April 24, 2012

use of undeclared identifier 'isinf' error

My iOS project includes both C and C++ code (because I have integrated openCV).

Everything works fine as long as I don't include Mapkit.h. As soon as I include Mapkit.h I get the the following compile error:



Use of undeclared identifier 'isinf'


This error occurs in MKGeometry.h. I Google'ed around and the only thing I gathered is that the error has something to do with the fact that C++ has undefined isinf as a macro and declared it as a function in cmath.h.



I can't change MKGeometry.h (which is not a good idea, anyway) and I don't really want to change the standard headers (math.h or cmath.h) either. Is there a fix for this?



Many thanks for the help,





1 comment: