Like most iphone programmers I just recently started programing on the mac, so if I am doing something stupid please let me know.
I am trying to compile the Box2D code into my iphone project. I copied the source and include folders into my project and I am trying to get the HelloWorld example working (To my understanding you can't use dynamic libraries for iphone).
I getting these error when linking
Does anyone have an idea why I am getting these linking errors?
Thanks for your help.
I am trying to compile the Box2D code into my iphone project. I copied the source and include folders into my project and I am trying to get the HelloWorld example working (To my understanding you can't use dynamic libraries for iphone).
I getting these error when linking
Code:
Building target “2DBox-OpenGLES-test” of project “2DBox-OpenGLES-test” with configuration “Debug” — (7 errors)
cd /code/TestApps/2DBox-OpenGLES-test
/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/g++-4.0 -arch i386 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator2.1.sdk -L/code/TestApps/2DBox-OpenGLES-test/build/Debug-iphonesimulator -L/code/TestApps/2DBox-OpenGLES-test/../../Box2D_v2-0-1/Library -L/code/TestApps/2DBox-OpenGLES-test -F/code/TestApps/2DBox-OpenGLES-test/build/Debug-iphonesimulator -filelist /code/TestApps/2DBox-OpenGLES-test/build/2DBox-OpenGLES-test.build/Debug-iphonesimulator/2DBox-OpenGLES-test.build/Objects-normal/i386/2DBox-OpenGLES-test.LinkFileList -mmacosx-version-min=10.5 -framework Foundation -framework UIKit -framework OpenGLES -framework QuartzCore -o /code/TestApps/2DBox-OpenGLES-test/build/Debug-iphonesimulator/2DBox-OpenGLES-test.app/2DBox-OpenGLES-test
Undefined symbols:
"b2World::b2World(b2AABB const&, b2Vec2 const&, bool)", referenced from:
-[My2dBox helloWorld] in My2dBox.o
"b2Body::CreateShape(b2ShapeDef*)", referenced from:
-[My2dBox helloWorld] in My2dBox.o
-[My2dBox helloWorld] in My2dBox.o
"b2Body::SetMassFromShapes()", referenced from:
-[My2dBox helloWorld] in My2dBox.o
"b2World::Step(float, int)", referenced from:
-[My2dBox helloWorld] in My2dBox.o
"b2World::~b2World()", referenced from:
-[My2dBox helloWorld] in My2dBox.o
-[My2dBox helloWorld] in My2dBox.o
"b2PolygonDef::SetAsBox(float, float)", referenced from:
-[My2dBox helloWorld] in My2dBox.o
-[My2dBox helloWorld] in My2dBox.o
"b2World::CreateBody(b2BodyDef const*)", referenced from:
-[My2dBox helloWorld] in My2dBox.o
-[My2dBox helloWorld] in My2dBox.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
"b2World::b2World(b2AABB const&, b2Vec2 const&, bool)", referenced from:
-[My2dBox helloWorld] in My2dBox.o
"b2Body::CreateShape(b2ShapeDef*)", referenced from:
-[My2dBox helloWorld] in My2dBox.o
-[My2dBox helloWorld] in My2dBox.o
"b2Body::SetMassFromShapes()", referenced from:
-[My2dBox helloWorld] in My2dBox.o
"b2World::Step(float, int)", referenced from:
-[My2dBox helloWorld] in My2dBox.o
"b2World::~b2World()", referenced from:
-[My2dBox helloWorld] in My2dBox.o
-[My2dBox helloWorld] in My2dBox.o
"b2PolygonDef::SetAsBox(float, float)", referenced from:
-[My2dBox helloWorld] in My2dBox.o
-[My2dBox helloWorld] in My2dBox.o
"b2World::CreateBody(b2BodyDef const*)", referenced from:
-[My2dBox helloWorld] in My2dBox.o
-[My2dBox helloWorld] in My2dBox.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
Build failed (7 errors)
cd /code/TestApps/2DBox-OpenGLES-test
/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/g++-4.0 -arch i386 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator2.1.sdk -L/code/TestApps/2DBox-OpenGLES-test/build/Debug-iphonesimulator -L/code/TestApps/2DBox-OpenGLES-test/../../Box2D_v2-0-1/Library -L/code/TestApps/2DBox-OpenGLES-test -F/code/TestApps/2DBox-OpenGLES-test/build/Debug-iphonesimulator -filelist /code/TestApps/2DBox-OpenGLES-test/build/2DBox-OpenGLES-test.build/Debug-iphonesimulator/2DBox-OpenGLES-test.build/Objects-normal/i386/2DBox-OpenGLES-test.LinkFileList -mmacosx-version-min=10.5 -framework Foundation -framework UIKit -framework OpenGLES -framework QuartzCore -o /code/TestApps/2DBox-OpenGLES-test/build/Debug-iphonesimulator/2DBox-OpenGLES-test.app/2DBox-OpenGLES-test
Undefined symbols:
"b2World::b2World(b2AABB const&, b2Vec2 const&, bool)", referenced from:
-[My2dBox helloWorld] in My2dBox.o
"b2Body::CreateShape(b2ShapeDef*)", referenced from:
-[My2dBox helloWorld] in My2dBox.o
-[My2dBox helloWorld] in My2dBox.o
"b2Body::SetMassFromShapes()", referenced from:
-[My2dBox helloWorld] in My2dBox.o
"b2World::Step(float, int)", referenced from:
-[My2dBox helloWorld] in My2dBox.o
"b2World::~b2World()", referenced from:
-[My2dBox helloWorld] in My2dBox.o
-[My2dBox helloWorld] in My2dBox.o
"b2PolygonDef::SetAsBox(float, float)", referenced from:
-[My2dBox helloWorld] in My2dBox.o
-[My2dBox helloWorld] in My2dBox.o
"b2World::CreateBody(b2BodyDef const*)", referenced from:
-[My2dBox helloWorld] in My2dBox.o
-[My2dBox helloWorld] in My2dBox.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
"b2World::b2World(b2AABB const&, b2Vec2 const&, bool)", referenced from:
-[My2dBox helloWorld] in My2dBox.o
"b2Body::CreateShape(b2ShapeDef*)", referenced from:
-[My2dBox helloWorld] in My2dBox.o
-[My2dBox helloWorld] in My2dBox.o
"b2Body::SetMassFromShapes()", referenced from:
-[My2dBox helloWorld] in My2dBox.o
"b2World::Step(float, int)", referenced from:
-[My2dBox helloWorld] in My2dBox.o
"b2World::~b2World()", referenced from:
-[My2dBox helloWorld] in My2dBox.o
-[My2dBox helloWorld] in My2dBox.o
"b2PolygonDef::SetAsBox(float, float)", referenced from:
-[My2dBox helloWorld] in My2dBox.o
-[My2dBox helloWorld] in My2dBox.o
"b2World::CreateBody(b2BodyDef const*)", referenced from:
-[My2dBox helloWorld] in My2dBox.o
-[My2dBox helloWorld] in My2dBox.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
Build failed (7 errors)
Does anyone have an idea why I am getting these linking errors?
Thanks for your help.