wayou / box2d

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

Testbed build error on Mac OS X #343

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. cmake -G "Unix Makefiles"
2. make

What is the expected output? What do you see instead?
The error is below:
~/Box2D_v2.3.0/Box2D/Testbed/Framework/Test.h:38:24: error:
      no member named 'rand' in namespace 'std'; did you mean simply 'rand'?

What version of the product are you using? On what operating system?
Box2D_v2.3.0
On OS X 10.9.5
g++ 4.2.1 Apple LLVM version 6.0 (clang-600.0.56) (based on LLVM 3.5svn)

Please provide any additional information below.
In Box2D/Testbed/Framework/Test.h L25, replace
#include <stdlib.h>
into
#include <cstdlib>
it works.

Original issue reported on code.google.com by Ryogo.Yo...@gmail.com on 28 Feb 2015 at 3:20