RoamUniverse / pyv8

Automatically exported from code.google.com/p/pyv8
0 stars 0 forks source link

conversions-inl.h needs cmath for os x #23

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Compiling PyV8 0.8 on OS X (10.6) will die with:
/tmp/v8/src/conversions-inl.h: In function ‘double 
v8::internal::DoubleToInteger(double)’:
/tmp/v8/src/conversions-inl.h:63: error: ‘isnan’ was not declared in this 
scope

Googling found this:
http://old.nabble.com/Re:-(Update)-Difficulty-building-Gazebo-on-
OSX-10.4-(ltdl-and-ODE-trimesh)-td19023897.html

"It seems the issue with isnan is that the isnan macro is carefully removed 
from math.h on OSX in favor of using std::isnan."

It suggested adding:

#include <cmath>
extern "C" int isnan(double);

When I did this, PyV8 compiled just fine. It may need a macro to protect it 
on other platforms.

Original issue reported on code.google.com by progr...@gmail.com on 5 Jan 2010 at 4:55

GoogleCodeExporter commented 9 years ago
I have made some minor changes to make GCC happy, please check out the source 
code 
from SVN after r200, and verify it.

Thanks

Original comment by flier...@gmail.com on 11 Jan 2010 at 2:43

GoogleCodeExporter commented 9 years ago
It looks like it compiled fine, so: verified.

Original comment by progr...@gmail.com on 12 Jan 2010 at 8:54

GoogleCodeExporter commented 9 years ago
Thanks :)

Original comment by flier...@gmail.com on 13 Jan 2010 at 2:24