Found the fix. The solution is #include "math.h" at the top of foo.cpp file, i.e. before any #include header files which maybe over-riding some of the math definitions. I have another question, but I will post a different thread for that :-) Thanks again, - Nirav