Trouble building TestBed on Linux

Box2D rev10.

The error I'm getting is:

Code:
BroadPhaseTest.h:25: error: expected class-name before ‘{’ token


I have to assume this means b2PairCallback is not defined. I have no idea where that's supposed to be defined... I can't find it.
could you post a little more of the errors?

i remember, that i had a lot of

undefined symbol 'something'

messages all coming from string.h, so i had to open all that files that caused the error and add a

#include <string.h>

on top of the file
93interactive wrote:
could you post a little more of the errors?


Quote:
In file included from /home/mark/Desktop/box2d-2.1.0/Box2D/Examples/Testbed/Tests/BroadPhaseTest.cpp:21:
/home/mark/Desktop/box2d-2.1.0/Box2D/Examples/Testbed/Tests/BroadPhaseTest.h:25: error: expected class-name before ‘{’ token
/home/mark/Desktop/box2d-2.1.0/Box2D/Examples/Testbed/Tests/BroadPhaseTest.cpp: In constructor ‘BroadPhaseTest::BroadPhaseTest()’:
/home/mark/Desktop/box2d-2.1.0/Box2D/Examples/Testbed/Tests/BroadPhaseTest.cpp:79: error: ‘s_validate’ is not a member of ‘b2BroadPhase’
/home/mark/Desktop/box2d-2.1.0/Box2D/Examples/Testbed/Tests/BroadPhaseTest.cpp:91: error: no matching function for call to ‘b2BroadPhase::b2BroadPhase(b2AABB&, Callback*)’
/usr/local/include/Box2D/Collision/b2BroadPhase.h:46: note: candidates are: b2BroadPhase::b2BroadPhase()
/usr/local/include/Box2D/Collision/b2BroadPhase.h:38: note: b2BroadPhase::b2BroadPhase(const b2BroadPhase&)
/home/mark/Desktop/box2d-2.1.0/Box2D/Examples/Testbed/Tests/BroadPhaseTest.cpp:103: error: ‘class b2BroadPhase’ has no member named ‘Validate’
/home/mark/Desktop/box2d-2.1.0/Box2D/Examples/Testbed/Tests/BroadPhaseTest.cpp: In destructor ‘virtual BroadPhaseTest::~BroadPhaseTest()’:
/home/mark/Desktop/box2d-2.1.0/Box2D/Examples/Testbed/Tests/BroadPhaseTest.cpp:112: error: ‘s_validate’ is not a member of ‘b2BroadPhase’
/home/mark/Desktop/box2d-2.1.0/Box2D/Examples/Testbed/Tests/BroadPhaseTest.cpp: In member function ‘void BroadPhaseTest::CreateProxy()’:
/home/mark/Desktop/box2d-2.1.0/Box2D/Examples/Testbed/Tests/BroadPhaseTest.cpp:150: error: ‘b2_nullProxy’ was not declared in this scope
/home/mark/Desktop/box2d-2.1.0/Box2D/Examples/Testbed/Tests/BroadPhaseTest.cpp: In member function ‘void BroadPhaseTest::DestroyProxy()’:
/home/mark/Desktop/box2d-2.1.0/Box2D/Examples/Testbed/Tests/BroadPhaseTest.cpp:166: error: ‘b2_nullProxy’ was not declared in this scope
/home/mark/Desktop/box2d-2.1.0/Box2D/Examples/Testbed/Tests/BroadPhaseTest.cpp: In member function ‘void BroadPhaseTest::MoveProxy()’:
/home/mark/Desktop/box2d-2.1.0/Box2D/Examples/Testbed/Tests/BroadPhaseTest.cpp:183: error: ‘b2_nullProxy’ was not declared in this scope
/home/mark/Desktop/box2d-2.1.0/Box2D/Examples/Testbed/Tests/BroadPhaseTest.cpp:189: error: no matching function for call to ‘b2BroadPhase::MoveProxy(uint16&, b2AABB&)’
/usr/local/include/Box2D/Collision/b2BroadPhase.h:58: note: candidates are: void b2BroadPhase::MoveProxy(int32, const b2AABB&, const b2Vec2&)
/home/mark/Desktop/box2d-2.1.0/Box2D/Examples/Testbed/Tests/BroadPhaseTest.cpp: In member function ‘virtual void BroadPhaseTest::Step(Settings*)’:
/home/mark/Desktop/box2d-2.1.0/Box2D/Examples/Testbed/Tests/BroadPhaseTest.cpp:227: error: ‘class b2BroadPhase’ has no member named ‘Commit’
/home/mark/Desktop/box2d-2.1.0/Box2D/Examples/Testbed/Tests/BroadPhaseTest.cpp:232: error: ‘b2_nullProxy’ was not declared in this scope
/home/mark/Desktop/box2d-2.1.0/Box2D/Examples/Testbed/Tests/BroadPhaseTest.cpp: In member function ‘void BroadPhaseTest::Validate()’:
/home/mark/Desktop/box2d-2.1.0/Box2D/Examples/Testbed/Tests/BroadPhaseTest.cpp:286: error: ‘class b2BroadPhase’ has no member named ‘Validate’
/home/mark/Desktop/box2d-2.1.0/Box2D/Examples/Testbed/Tests/BroadPhaseTest.cpp:293: error: ‘b2_nullProxy’ was not declared in this scope
/home/mark/Desktop/box2d-2.1.0/Box2D/Examples/Testbed/Tests/BroadPhaseTest.cpp:299: error: ‘b2_nullProxy’ was not declared in this scope


Well something is definitely is not being included, I just don't know what, nor why.
If you look in TestEntries.cpp you will see that BroadPhaseTest.h is no longer included. So don't try to compile BroadPhaseTest.cpp.
Erin Catto wrote:
If you look in TestEntries.cpp you will see that BroadPhaseTest.h is no longer included. So don't try to compile BroadPhaseTest.cpp.


Oh. Thanks Erin 🙂 I'll try removing it later. Should be able to update CMake contribution too then.

Original thread: https://box2d.org/forum/viewtopic.php?t=3667