Hello,
I have to write an interface between Box2D and the graphic library SFML. Now I have a problem
with the creation of a b2PolygonDef and I don't now what's the problem.
On my system with Windows 7 x64 everything works fine, but on Windows XP x32 it fails.
The fifth line of the Code is maybe the problem, if I comment this line, there is no failure.
I used Visual Studio 2008 Debugger at this is the error:
Please can somebody help me?
I have to write an interface between Box2D and the graphic library SFML. Now I have a problem
with the creation of a b2PolygonDef and I don't now what's the problem.
On my system with Windows 7 x64 everything works fine, but on Windows XP x32 it fails.
The fifth line of the Code is maybe the problem, if I comment this line, there is no failure.
Code:
b2BodyDef groundBodyDef;
groundBodyDef.position.Set(windowWidth/20.0f, -2.0f);
b2Body* groundBody = physicWorld->createBody(groundBodyDef);
b2PolygonDef groundShapeBottom;
groundShapeBottom.SetAsBox(500.0f, 10.0f);
//groundBody->CreateShape(&groundShapeBottom);
groundBodyDef.position.Set(windowWidth/20.0f, -2.0f);
b2Body* groundBody = physicWorld->createBody(groundBodyDef);
b2PolygonDef groundShapeBottom;
groundShapeBottom.SetAsBox(500.0f, 10.0f);
//groundBody->CreateShape(&groundShapeBottom);
I used Visual Studio 2008 Debugger at this is the error:
Code:
Unhandled exception at 0x0040cbc9 in SFML-Box2D.exe: 0xC0000005:
Access violation while writing at position 0x002317e0.
Access violation while writing at position 0x002317e0.
Please can somebody help me?