This is probably a case of not studying well enough on my part, but I cannot figure out what I am doing wrong. In case it matters I am a user of Anjuta, and this is the clip of my code that seems to be at fault:
In case your at all wondering, I declared b16x16 and tbox elsewhere, they are not an issue. According to Anjuta, the lines with the arrows next to them are at fault and this is what it tells me:
Those last two are at fault at 'return 0;' at the end of main, but I suspect this is merely a result of the first two. I hope that code has helped you to helping me.
Code:
b2AABB demensions;
demensions.minVertex.Set(0.0,0.0);
demensions.maxVertex.Set(320.0,240.0);
b2Vec2 gravity(0.0,-10.0);
b2World pworld(demensions,gravity,true); <-
//Declare object in the world
b16x16.extents.Set(8.0,8.0);
b16x16.density=0.0;
tbox.position.Set(0.0,0.0);
tbox.AddShape(&b16x16);
b2Body* ground=pworld.CreateBody(&tbox); <-
demensions.minVertex.Set(0.0,0.0);
demensions.maxVertex.Set(320.0,240.0);
b2Vec2 gravity(0.0,-10.0);
b2World pworld(demensions,gravity,true); <-
//Declare object in the world
b16x16.extents.Set(8.0,8.0);
b16x16.density=0.0;
tbox.position.Set(0.0,0.0);
tbox.AddShape(&b16x16);
b2Body* ground=pworld.CreateBody(&tbox); <-
In case your at all wondering, I declared b16x16 and tbox elsewhere, they are not an issue. According to Anjuta, the lines with the arrows next to them are at fault and this is what it tells me:
Quote:
main.o: In function 'main':
main.cc:129: undefined reference to 'b2World::b2World(b2AABB const&, b2Vec2 const&, bool)'
main.cc:135: undefined reference to 'b2World::CreateBody(b2BodyDef const*)'
main.cc:135: undefined reference to 'b2World::~b2World()'
main.cc:135: undefined reference to 'b2World::~b2World()'
main.cc:129: undefined reference to 'b2World::b2World(b2AABB const&, b2Vec2 const&, bool)'
main.cc:135: undefined reference to 'b2World::CreateBody(b2BodyDef const*)'
main.cc:135: undefined reference to 'b2World::~b2World()'
main.cc:135: undefined reference to 'b2World::~b2World()'
Those last two are at fault at 'return 0;' at the end of main, but I suspect this is merely a result of the first two. I hope that code has helped you to helping me.