please someone share a working xcode example

zalavariandris
Posts: 12
Joined: Wed Feb 18, 2009 12:31 am

please someone share a working xcode example

Post by zalavariandris »

Hi!

Got some problems with bullet on mac. not even the included examples compile. Not even the Hello world Tutorial.

I'm not able to include the Bullet sources, becouse they missing other files.
...
please someone share an Xcode project with bullet working.

this is the closest i got trying to compile the included cocoa xcode demo.
Xcode error:

Building target “AllBulletDemos” of project “AllBulletDemos” with configuration “Debug” — (1 error)
cd /Users/andris/Downloads/bullet-2.73/Extras/AllBulletDemosOSX
/Developer/usr/bin/gcc-4.0 -x c++ -arch i386 -fmessage-length=0 -pipe -Wno-trigraphs -fpascal-strings -fasm-blocks -O0 -Wreturn-type -Wunused-variable -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mfix-and-continue -fvisibility-inlines-hidden -mmacosx-version-min=10.4 -gdwarf-2 -iquote /Users/andris/Downloads/bullet-2.73/Extras/AllBulletDemosOSX/build/AllBulletDemos.build/Debug/AllBulletDemos.build/AllBulletDemos-generated-files.hmap -I/Users/andris/Downloads/bullet-2.73/Extras/AllBulletDemosOSX/build/AllBulletDemos.build/Debug/AllBulletDemos.build/AllBulletDemos-own-target-headers.hmap -I/Users/andris/Downloads/bullet-2.73/Extras/AllBulletDemosOSX/build/AllBulletDemos.build/Debug/AllBulletDemos.build/AllBulletDemos-all-target-headers.hmap -iquote /Users/andris/Downloads/bullet-2.73/Extras/AllBulletDemosOSX/build/AllBulletDemos.build/Debug/AllBulletDemos.build/AllBulletDemos-project-headers.hmap -F/Users/andris/Downloads/bullet-2.73/Extras/AllBulletDemosOSX/build/Debug -I/Users/andris/Downloads/bullet-2.73/Extras/AllBulletDemosOSX/build/Debug/include -I../../Demos/AllBulletDemos -I../../Demos/OpenGL -I../../src -I../../Extras/COLLADA_DOM/include -I../../Extras/COLLADA_DOM/include/1.4 -I../../Extras/LibXML/include -I../../Extras/LibXML -I../../Extras/ConvexDecomposition -I../../Extras/GIMPACTUtils -I../../Extras/GIMPACT/include -I../../Extras -I../../Extras/BulletColladaConverter -I/Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/GLUT.framework/Headers -I/Users/andris/Downloads/bullet-2.73/Extras/AllBulletDemosOSX/build/AllBulletDemos.build/Debug/AllBulletDemos.build/DerivedSources -include /var/folders/ST/STbVh93KGXCa7KdzbPZKLU+++TI/-Caches-/com.apple.Xcode.501/SharedPrecompiledHeaders/AllBulletDemos_Prefix-hhvjdtrngeartpfejscfpasymilv/AllBulletDemos_Prefix.pch -c /Users/andris/Downloads/bullet-2.73/Extras/AllBulletDemosOSX/../../src/BulletCollision/NarrowPhaseCollision/btGjkEpa.cpp -o /Users/andris/Downloads/bullet-2.73/Extras/AllBulletDemosOSX/build/AllBulletDemos.build/Debug/AllBulletDemos.build/Objects-normal/i386/btGjkEpa.o
i686-apple-darwin9-gcc-4.0.1: /Users/andris/Downloads/bullet-2.73/Extras/AllBulletDemosOSX/../../src/BulletCollision/NarrowPhaseCollision/btGjkEpa.cpp: No such file or directory
i686-apple-darwin9-gcc-4.0.1: warning: '-x c++' after last input file has no effect
i686-apple-darwin9-gcc-4.0.1: no input files
i686-apple-darwin9-gcc-4.0.1: no input files
i686-apple-darwin9-gcc-4.0.1: no input files
i686-apple-darwin9-gcc-4.0.1: no input files
i686-apple-darwin9-gcc-4.0.1: no input files
Build failed (1 error)
zalavariandris
Posts: 12
Joined: Wed Feb 18, 2009 12:31 am

Re: please someone share a working xcode example

Post by zalavariandris »

Here is what I got when i use bullet folder as a header search path.
it's able to incude <btBulletDynamicsCommon.h>bur got errors inside the bullet source

Building target “bulletTest01” of project “bulletTest01” with configuration “Debug” — (13 errors)
cd /Users/andris/Documents/andrisDocuments/Tanulas/programozas/bulletTest01
setenv MACOSX_DEPLOYMENT_TARGET 10.5
/Developer/usr/bin/g++-4.0 -arch i386 -isysroot /Developer/SDKs/MacOSX10.5.sdk -L/Users/andris/Documents/andrisDocuments/Tanulas/programozas/bulletTest01/build/Debug -F/Users/andris/Documents/andrisDocuments/Tanulas/programozas/bulletTest01/build/Debug -filelist /Users/andris/Documents/andrisDocuments/Tanulas/programozas/bulletTest01/build/bulletTest01.build/Debug/bulletTest01.build/Objects-normal/i386/bulletTest01.LinkFileList -mmacosx-version-min=10.5 -o /Users/andris/Documents/andrisDocuments/Tanulas/programozas/bulletTest01/build/Debug/bulletTest01
Undefined symbols:
"btAxisSweep3::btAxisSweep3(btVector3 const&, btVector3 const&, unsigned short, btOverlappingPairCache*, bool)", referenced from:
_main in main.o
"btDiscreteDynamicsWorld::btDiscreteDynamicsWorld(btDispatcher*, btBroadphaseInterface*, btConstraintSolver*, btCollisionConfiguration*)", referenced from:
_main in main.o
"btCollisionDispatcher::btCollisionDispatcher(btCollisionConfiguration*)", referenced from:
_main in main.o
"vtable for btConvexInternalShape", referenced from:
__ZTV21btConvexInternalShape$non_lazy_ptr in main.o
"vtable for btSphereShape", referenced from:
__ZTV13btSphereShape$non_lazy_ptr in main.o
"btAlignedFreeInternal(void*)", referenced from:
btCollisionObject::operator delete(void*)in main.o
btConvexShape::operator delete(void*)in main.o
btSphereShape::operator delete(void*)in main.o
btAxisSweep3Internal<unsigned short>::operator delete(void*)in main.o
"btRigidBody::btRigidBody(btRigidBody::btRigidBodyConstructionInfo const&)", referenced from:
_main in main.o
_main in main.o
"btSequentialImpulseConstraintSolver::btSequentialImpulseConstraintSolver()", referenced from:
_main in main.o
"btConvexShape::~btConvexShape()", referenced from:
btConvexInternalShape::~btConvexInternalShape()in main.o
"btConvexInternalShape::btConvexInternalShape()", referenced from:
btSphereShape::btSphereShape(float)in main.o
"btAlignedAllocInternal(unsigned long, int)", referenced from:
btCollisionObject::operator new(unsigned long)in main.o
btSphereShape::operator new(unsigned long)in main.o
btAxisSweep3Internal<unsigned short>::operator new(unsigned long)in main.o
"btDefaultCollisionConfiguration::btDefaultCollisionConfiguration(btDefaultCollisionConstructionInfo const&)", referenced from:
_main in main.o
"btStaticPlaneShape::btStaticPlaneShape(btVector3 const&, float)", referenced from:
_main in main.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
"btAxisSweep3::btAxisSweep3(btVector3 const&, btVector3 const&, unsigned short, btOverlappingPairCache*, bool)", referenced from:
_main in main.o
"btDiscreteDynamicsWorld::btDiscreteDynamicsWorld(btDispatcher*, btBroadphaseInterface*, btConstraintSolver*, btCollisionConfiguration*)", referenced from:
_main in main.o
"btCollisionDispatcher::btCollisionDispatcher(btCollisionConfiguration*)", referenced from:
_main in main.o
"vtable for btConvexInternalShape", referenced from:
__ZTV21btConvexInternalShape$non_lazy_ptr in main.o
"vtable for btSphereShape", referenced from:
__ZTV13btSphereShape$non_lazy_ptr in main.o
"btAlignedFreeInternal(void*)", referenced from:
btCollisionObject::operator delete(void*)in main.o
btConvexShape::operator delete(void*)in main.o
btSphereShape::operator delete(void*)in main.o
btAxisSweep3Internal<unsigned short>::operator delete(void*)in main.o
"btRigidBody::btRigidBody(btRigidBody::btRigidBodyConstructionInfo const&)", referenced from:
_main in main.o
_main in main.o
"btSequentialImpulseConstraintSolver::btSequentialImpulseConstraintSolver()", referenced from:
_main in main.o
"btConvexShape::~btConvexShape()", referenced from:
btConvexInternalShape::~btConvexInternalShape()in main.o
"btConvexInternalShape::btConvexInternalShape()", referenced from:
btSphereShape::btSphereShape(float)in main.o
"btAlignedAllocInternal(unsigned long, int)", referenced from:
btCollisionObject::operator new(unsigned long)in main.o
btSphereShape::operator new(unsigned long)in main.o
btAxisSweep3Internal<unsigned short>::operator new(unsigned long)in main.o
"btDefaultCollisionConfiguration::btDefaultCollisionConfiguration(btDefaultCollisionConstructionInfo const&)", referenced from:
_main in main.o
"btStaticPlaneShape::btStaticPlaneShape(btVector3 const&, float)", referenced from:
_main in main.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
Build failed (13 errors)
zalavariandris
Posts: 12
Joined: Wed Feb 18, 2009 12:31 am

Re: please someone share a working xcode example

Post by zalavariandris »

I got the error with the Hello World example
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA

Re: please someone share a working xcode example

Post by Erwin Coumans »

"Undefined symbols" means you are not linking to the Bullet libraries.

Have you tried installing CMake as described in the documentation?
You can run cmake . -G Xcode to generate XCode project files. Those build all the libraries and demos. Alternatively use make or jam. All 3 methods build fine on Mac OS. We'll fix the bullet/Extras/AllBulletDemosOSX before final Bullet 2.74 release.

Thanks for the feedback,
Erwin
zalavariandris
Posts: 12
Joined: Wed Feb 18, 2009 12:31 am

Re: please someone share a working xcode example

Post by zalavariandris »

Thanks for the reply!

but i got the same errors.

I did run cmake again. And generate the Xcode project files again. The included Xcode AllDemos is working fine, but the hello World tutorial is not.
I set the search header path to the ../bullet-2.74/src (tried recursively too(../bullet-2.74/src**)) folder. I can include the btBulletDynamicsCommon.h header file. But got errors in the Bullet Source files. I'm a bit new to Xcode. so ther must be a way to solve this.

here is thenew errors.

Building target “HelloBullet01” of project “HelloBullet01” with configuration “Debug” — (13 errors)
cd /Users/andris/Documents/andrisDocuments/HelloBullet01
setenv MACOSX_DEPLOYMENT_TARGET 10.5
/Developer/usr/bin/g++-4.0 -arch i386 -isysroot /Developer/SDKs/MacOSX10.5.sdk -L/Users/andris/Documents/andrisDocuments/HelloBullet01/build/Debug -L/Users/andris/Documents/andrisDocuments/HelloBullet01/../bullet-2.74/src/BulletCollision/Debug -L/Users/andris/Documents/andrisDocuments/HelloBullet01/../bullet-2.74/src/BulletDynamics/Debug -L/Users/andris/Documents/andrisDocuments/HelloBullet01/../bullet-2.74/src/BulletMultiThreaded/Debug -L/Users/andris/Documents/andrisDocuments/HelloBullet01/../bullet-2.74/src/BulletSoftBody/Debug -L/Users/andris/Documents/andrisDocuments/HelloBullet01/../bullet-2.74/src/LinearMath/Debug -F/Users/andris/Documents/andrisDocuments/HelloBullet01/build/Debug -filelist /Users/andris/Documents/andrisDocuments/HelloBullet01/build/HelloBullet01.build/Debug/HelloBullet01.build/Objects-normal/i386/HelloBullet01.LinkFileList -mmacosx-version-min=10.5 -o /Users/andris/Documents/andrisDocuments/HelloBullet01/build/Debug/HelloBullet01
Undefined symbols:
"btAxisSweep3::btAxisSweep3(btVector3 const&, btVector3 const&, unsigned short, btOverlappingPairCache*, bool)", referenced from:
_main in main.o
"btDiscreteDynamicsWorld::btDiscreteDynamicsWorld(btDispatcher*, btBroadphaseInterface*, btConstraintSolver*, btCollisionConfiguration*)", referenced from:
_main in main.o
"btCollisionDispatcher::btCollisionDispatcher(btCollisionConfiguration*)", referenced from:
_main in main.o
"vtable for btConvexInternalShape", referenced from:
__ZTV21btConvexInternalShape$non_lazy_ptr in main.o
"vtable for btSphereShape", referenced from:
__ZTV13btSphereShape$non_lazy_ptr in main.o
"btAlignedFreeInternal(void*)", referenced from:
btCollisionObject::operator delete(void*)in main.o
btConvexShape::operator delete(void*)in main.o
btSphereShape::operator delete(void*)in main.o
btAxisSweep3Internal<unsigned short>::operator delete(void*)in main.o
"btRigidBody::btRigidBody(btRigidBody::btRigidBodyConstructionInfo const&)", referenced from:
_main in main.o
_main in main.o
"btSequentialImpulseConstraintSolver::btSequentialImpulseConstraintSolver()", referenced from:
_main in main.o
"btConvexShape::~btConvexShape()", referenced from:
btConvexInternalShape::~btConvexInternalShape()in main.o
"btConvexInternalShape::btConvexInternalShape()", referenced from:
btSphereShape::btSphereShape(float)in main.o
"btAlignedAllocInternal(unsigned long, int)", referenced from:
btCollisionObject::operator new(unsigned long)in main.o
btSphereShape::operator new(unsigned long)in main.o
btAxisSweep3Internal<unsigned short>::operator new(unsigned long)in main.o
"btDefaultCollisionConfiguration::btDefaultCollisionConfiguration(btDefaultCollisionConstructionInfo const&)", referenced from:
_main in main.o
"btStaticPlaneShape::btStaticPlaneShape(btVector3 const&, float)", referenced from:
_main in main.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
"btAxisSweep3::btAxisSweep3(btVector3 const&, btVector3 const&, unsigned short, btOverlappingPairCache*, bool)", referenced from:
_main in main.o
"btDiscreteDynamicsWorld::btDiscreteDynamicsWorld(btDispatcher*, btBroadphaseInterface*, btConstraintSolver*, btCollisionConfiguration*)", referenced from:
_main in main.o
"btCollisionDispatcher::btCollisionDispatcher(btCollisionConfiguration*)", referenced from:
_main in main.o
"vtable for btConvexInternalShape", referenced from:
__ZTV21btConvexInternalShape$non_lazy_ptr in main.o
"vtable for btSphereShape", referenced from:
__ZTV13btSphereShape$non_lazy_ptr in main.o
"btAlignedFreeInternal(void*)", referenced from:
btCollisionObject::operator delete(void*)in main.o
btConvexShape::operator delete(void*)in main.o
btSphereShape::operator delete(void*)in main.o
btAxisSweep3Internal<unsigned short>::operator delete(void*)in main.o
"btRigidBody::btRigidBody(btRigidBody::btRigidBodyConstructionInfo const&)", referenced from:
_main in main.o
_main in main.o
"btSequentialImpulseConstraintSolver::btSequentialImpulseConstraintSolver()", referenced from:
_main in main.o
"btConvexShape::~btConvexShape()", referenced from:
btConvexInternalShape::~btConvexInternalShape()in main.o
"btConvexInternalShape::btConvexInternalShape()", referenced from:
btSphereShape::btSphereShape(float)in main.o
"btAlignedAllocInternal(unsigned long, int)", referenced from:
btCollisionObject::operator new(unsigned long)in main.o
btSphereShape::operator new(unsigned long)in main.o
btAxisSweep3Internal<unsigned short>::operator new(unsigned long)in main.o
"btDefaultCollisionConfiguration::btDefaultCollisionConfiguration(btDefaultCollisionConstructionInfo const&)", referenced from:
_main in main.o
"btStaticPlaneShape::btStaticPlaneShape(btVector3 const&, float)", referenced from:
_main in main.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
Build failed (13 errors)
zalavariandris
Posts: 12
Joined: Wed Feb 18, 2009 12:31 am

Re: please someone share a working xcode example

Post by zalavariandris »

The problem is that I'm not able to properly include the Bullet source in Xcode. so plleas describe how to include the files in Xcode. I tried the search header files, but its not working as I expect. I must missing a step.

This is what I do:

- starting xcode
- making a new consol project next ti bullet-2.74 folder
- set project setting to look for header files in "../bullet-2.74/src"
- then copy paste the hello world tutorial source from the "Hello Wrold" tutorial
- then it ofcourse finds no error in the main.cpp file, but it does find in the header files. (not showing them)

please help somehow
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA

Re: please someone share a working xcode example

Post by Erwin Coumans »

You need to include all the files from the Bullet/src directory to your project (or link against the libraries).

When using XCode, the easiest way is to recursively add all files of the Bullet/src folder to your project (use Project/Add to Project and select the Bullet/src folder).

Hope this helps,
Erwin
zalavariandris
Posts: 12
Joined: Wed Feb 18, 2009 12:31 am

Re: please someone share a working xcode example

Post by zalavariandris »

I have tried this way too.

Got even more errors(around 10000)



and it continues al the way. looks like its not able to find the files. non of them. even the <btBulletDynamicsCommon.h> file.

a few of them:
/Users/andris/Documents/andrisDocuments/BulletTest02/../bullet-2.74/src/BulletMultiThreaded/SpuNarrowPhaseCollisionTask/Box.h:26:28: error: vectormath_aos.h: No such file or directory
/Users/andris/Documents/andrisDocuments/BulletTest02/../bullet-2.74/src/BulletMultiThreaded/SpuNarrowPhaseCollisionTask/Box.h:28: error: 'Vectormath' has not been declared
/Users/andris/Documents/andrisDocuments/BulletTest02/../bullet-2.74/src/BulletMultiThreaded/SpuNarrowPhaseCollisionTask/Box.h:28: error: expected namespace-name before ';' token
/Users/andris/Documents/andrisDocuments/BulletTest02/../bullet-2.74/src/BulletMultiThreaded/SpuNarrowPhaseCollisionTask/Box.h:28: error: '<type error>' is not a namespace
/Users/andris/Documents/andrisDocuments/BulletTest02/../bullet-2.74/src/BulletMultiThreaded/SpuNarrowPhaseCollisionTask/Box.h:39: error: 'Vector3' does not name a type
/Users/andris/Documents/andrisDocuments/BulletTest02/../bullet-2.74/src/BulletMultiThreaded/SpuNarrowPhaseCollisionTask/Box.h:43: error: expected `)' before '&' token
/Users/andris/Documents/andrisDocuments/BulletTest02/../bullet-2.74/src/BulletMultiThreaded/SpuNarrowPhaseCollisionTask/Box.h:46: error: 'Vector3' has not been declared
/Users/andris/Documents/andrisDocuments/BulletTest02/../bullet-2.74/src/BulletMultiThreaded/SpuNarrowPhaseCollisionTask/Box.h:49: error: 'Vector3' does not name a type
/Users/andris/Documents/andrisDocuments/BulletTest02/../bullet-2.74/src/BulletMultiThreaded/SpuNarrowPhaseCollisionTask/Box.h:53: error: expected `)' before '&' token
/Users/andris/Documents/andrisDocuments/BulletTest02/../bullet-2.74/src/BulletMultiThreaded/SpuNarrowPhaseCollisionTask/Box.h:66: error: variable or field 'Set' declared void
Last edited by zalavariandris on Thu Feb 19, 2009 11:13 pm, edited 1 time in total.
zalavariandris
Posts: 12
Joined: Wed Feb 18, 2009 12:31 am

Re: please someone share a working xcode example

Post by zalavariandris »

It shoud work by simply adding the files in the src folder.


what about those libraries? Where can I find those?
if you mean the *.a files I tried to include them too.
but it woud be realy easy with .framework files.
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA

Re: please someone share a working xcode example

Post by Erwin Coumans »

I did run cmake again. And generate the Xcode project files again. The included Xcode AllDemos is working fine,
Good, so at least you have some working xcode example then. If you used cmake . -G Xcode, and build the Release configuration, the libraries are here:

bullet-2.74/src/BulletSoftBody/Release/libBulletSoftBody.a
bullet-2.74/src/BulletDynamics/Release/libBulletDynamics.a
bullet-2.74/src/BulletCollision/Release/libBulletCollision.a
bullet-2.74/src/LinearMath/Release/libLinearMath.a
/Users/andris/Documents/andrisDocuments/BulletTest02/../bullet-2.74/src/BulletMultiThreaded/SpuNarrowPhaseCollisionTask/Box.h:26:28: error: vectormath_aos.h: No such file or directory
All those errors are because bullet-2.74/src/BulletMultiThreaded requires an additional header search path. So either add this additional directory to your header file search path:

Code: Select all

bullet-2.74/src/BulletMultiThreaded/vectormath/scalar/cpp
bullet-2.74/src
[code]
or remove all files from bullet-2.74/src/BulletMultiThreaded from your project (it is optional only).

Hope this helps,
Erwin
zalavariandris
Posts: 12
Joined: Wed Feb 18, 2009 12:31 am

Re: please someone share a working xcode example

Post by zalavariandris »

if I set the searchpath to bullet-2.74/src I got 13 errors


Building target “BulletTest03” of project “BulletTest03” with configuration “Debug” — (13 errors)
cd /Users/andris/Documents/andrisDocuments/BulletTest03
setenv MACOSX_DEPLOYMENT_TARGET 10.5
/Developer/usr/bin/g++-4.0 -arch i386 -isysroot /Developer/SDKs/MacOSX10.5.sdk -L/Users/andris/Documents/andrisDocuments/BulletTest03/build/Debug -F/Users/andris/Documents/andrisDocuments/BulletTest03/build/Debug -filelist /Users/andris/Documents/andrisDocuments/BulletTest03/build/BulletTest03.build/Debug/BulletTest03.build/Objects-normal/i386/BulletTest03.LinkFileList -mmacosx-version-min=10.5 -o /Users/andris/Documents/andrisDocuments/BulletTest03/build/Debug/BulletTest03
Undefined symbols:
"btAxisSweep3::btAxisSweep3(btVector3 const&, btVector3 const&, unsigned short, btOverlappingPairCache*, bool)", referenced from:
_main in main.o
"btDiscreteDynamicsWorld::btDiscreteDynamicsWorld(btDispatcher*, btBroadphaseInterface*, btConstraintSolver*, btCollisionConfiguration*)", referenced from:
_main in main.o
"btCollisionDispatcher::btCollisionDispatcher(btCollisionConfiguration*)", referenced from:
_main in main.o
"vtable for btConvexInternalShape", referenced from:
__ZTV21btConvexInternalShape$non_lazy_ptr in main.o
"vtable for btSphereShape", referenced from:
__ZTV13btSphereShape$non_lazy_ptr in main.o
"btAlignedFreeInternal(void*)", referenced from:
btCollisionObject::operator delete(void*)in main.o
btConvexShape::operator delete(void*)in main.o
btSphereShape::operator delete(void*)in main.o
btAxisSweep3Internal<unsigned short>::operator delete(void*)in main.o
"btRigidBody::btRigidBody(btRigidBody::btRigidBodyConstructionInfo const&)", referenced from:
_main in main.o
_main in main.o
"btSequentialImpulseConstraintSolver::btSequentialImpulseConstraintSolver()", referenced from:
_main in main.o
"btConvexShape::~btConvexShape()", referenced from:
btConvexInternalShape::~btConvexInternalShape()in main.o
"btConvexInternalShape::btConvexInternalShape()", referenced from:
btSphereShape::btSphereShape(float)in main.o
"btAlignedAllocInternal(unsigned long, int)", referenced from:
btCollisionObject::operator new(unsigned long)in main.o
btSphereShape::operator new(unsigned long)in main.o
btAxisSweep3Internal<unsigned short>::operator new(unsigned long)in main.o
"btDefaultCollisionConfiguration::btDefaultCollisionConfiguration(btDefaultCollisionConstructionInfo const&)", referenced from:
_main in main.o
"btStaticPlaneShape::btStaticPlaneShape(btVector3 const&, float)", referenced from:
_main in main.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
"btAxisSweep3::btAxisSweep3(btVector3 const&, btVector3 const&, unsigned short, btOverlappingPairCache*, bool)", referenced from:
_main in main.o
"btDiscreteDynamicsWorld::btDiscreteDynamicsWorld(btDispatcher*, btBroadphaseInterface*, btConstraintSolver*, btCollisionConfiguration*)", referenced from:
_main in main.o
"btCollisionDispatcher::btCollisionDispatcher(btCollisionConfiguration*)", referenced from:
_main in main.o
"vtable for btConvexInternalShape", referenced from:
__ZTV21btConvexInternalShape$non_lazy_ptr in main.o
"vtable for btSphereShape", referenced from:
__ZTV13btSphereShape$non_lazy_ptr in main.o
"btAlignedFreeInternal(void*)", referenced from:
btCollisionObject::operator delete(void*)in main.o
btConvexShape::operator delete(void*)in main.o
btSphereShape::operator delete(void*)in main.o
btAxisSweep3Internal<unsigned short>::operator delete(void*)in main.o
"btRigidBody::btRigidBody(btRigidBody::btRigidBodyConstructionInfo const&)", referenced from:
_main in main.o
_main in main.o
"btSequentialImpulseConstraintSolver::btSequentialImpulseConstraintSolver()", referenced from:
_main in main.o
"btConvexShape::~btConvexShape()", referenced from:
btConvexInternalShape::~btConvexInternalShape()in main.o
"btConvexInternalShape::btConvexInternalShape()", referenced from:
btSphereShape::btSphereShape(float)in main.o
"btAlignedAllocInternal(unsigned long, int)", referenced from:
btCollisionObject::operator new(unsigned long)in main.o
btSphereShape::operator new(unsigned long)in main.o
btAxisSweep3Internal<unsigned short>::operator new(unsigned long)in main.o
"btDefaultCollisionConfiguration::btDefaultCollisionConfiguration(btDefaultCollisionConstructionInfo const&)", referenced from:
_main in main.o
"btStaticPlaneShape::btStaticPlaneShape(btVector3 const&, float)", referenced from:
_main in main.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
Build failed (13 errors)
zalavariandris
Posts: 12
Joined: Wed Feb 18, 2009 12:31 am

Re: please someone share a working xcode example

Post by zalavariandris »

I managed to create compilable consol application. set the search path to bullet-2.74/src** and drag'n drop the .a librari files.

still dont know why this works. This cant be the proper setup. anyway it works.

a few question:
what are those library files?
what are the proper setup for a bullet development environment in Xcode?

I still got problems (sorry)
I tired the same way to include it in to a Cocoa application and it did't work.
so instead starting with a consol application in Xcode I started with a cocoa application. drag'n drop the .a files, and set te search path to bullet-2.74/src**. then tried to include the btBulletDynamics.h file. i got 1337 errors.

hope you can help

a few(!) of them:


Building target “BulletTest06(cocoa)” of project “BulletTest06(cocoa)” with configuration “Debug” — (1337 errors, 283 warnings)
Checking Dependencies
Warning: The Copy Bundle Resources build phase contains this target's Info.plist file 'Info.plist'.
Warning: The Copy Bundle Resources build phase contains this target's Info.plist file 'Info.plist'.
cd "/Users/andris/Documents/andrisDocuments/BulletTest06(cocoa)"
/Developer/usr/bin/gcc-4.0 -x objective-c -arch i386 -fmessage-length=0 -pipe -std=c99 -Wno-trigraphs -fpascal-strings -fasm-blocks -O0 -Wreturn-type -Wunused-variable -isysroot /Developer/SDKs/MacOSX10.5.sdk -mfix-and-continue -mmacosx-version-min=10.5 -gdwarf-2 -iquote /Users/andris/Documents/andrisDocuments/BulletTest06(cocoa)/build/BulletTest06(cocoa).build/Debug/BulletTest06(cocoa).build/BulletTest06(cocoa)-generated-files.hmap -I/Users/andris/Documents/andrisDocuments/BulletTest06(cocoa)/build/BulletTest06(cocoa).build/Debug/BulletTest06(cocoa).build/BulletTest06(cocoa)-own-target-headers.hmap -I/Users/andris/Documents/andrisDocuments/BulletTest06(cocoa)/build/BulletTest06(cocoa).build/Debug/BulletTest06(cocoa).build/BulletTest06(cocoa)-all-target-headers.hmap -iquote /Users/andris/Documents/andrisDocuments/BulletTest06(cocoa)/build/BulletTest06(cocoa).build/Debug/BulletTest06(cocoa).build/BulletTest06(cocoa)-project-headers.hmap -F/Users/andris/Documents/andrisDocuments/BulletTest06(cocoa)/build/Debug -I/Users/andris/Documents/andrisDocuments/BulletTest06(cocoa)/build/Debug/include -I../bullet-2.74/src -I../bullet-2.74/src/BulletCollision -I../bullet-2.74/src/BulletDynamics -I../bullet-2.74/src/BulletMultiThreaded -I../bullet-2.74/src/BulletSoftBody -I../bullet-2.74/src/CMakeFiles -I../bullet-2.74/src/ibmsdk -I../bullet-2.74/src/LinearMath -I../bullet-2.74/src/BulletCollision/BroadphaseCollision -I../bullet-2.74/src/BulletCollision/BULLET_PHYSICS.build -I../bullet-2.74/src/BulletCollision/CMakeFiles -I../bullet-2.74/src/BulletCollision/CMakeScripts -I../bullet-2.74/src/BulletCollision/CollisionDispatch -I../bullet-2.74/src/BulletCollision/CollisionShapes -I../bullet-2.74/src/BulletCollision/Debug -I../bullet-2.74/src/BulletCollision/Gimpact -I../bullet-2.74/src/BulletCollision/ibmsdk -I../bullet-2.74/src/BulletCollision/NarrowPhaseCollision -I../bullet-2.74/src/BulletDynamics/BULLET_PHYSICS.build -I../bullet-2.74/src/BulletDynamics/Character -I../bullet-2.74/src/BulletDynamics/CMakeFiles -I../bullet-2.74/src/BulletDynamics/CMakeScripts -I../bullet-2.74/src/BulletDynamics/ConstraintSolver -I../bullet-2.74/src/BulletDynamics/Debug -I../bullet-2.74/src/BulletDynamics/Dynamics -I../bullet-2.74/src/BulletDynamics/ibmsdk -I../bullet-2.74/src/BulletDynamics/Vehicle -I../bullet-2.74/src/BulletMultiThreaded/BULLET_PHYSICS.build -I../bullet-2.74/src/BulletMultiThreaded/CMakeFiles -I../bullet-2.74/src/BulletMultiThreaded/CMakeScripts -I../bullet-2.74/src/BulletMultiThreaded/Debug -I../bullet-2.74/src/BulletMultiThreaded/out -I../bullet-2.74/src/BulletMultiThreaded/SpuIntegrationTask -I../bullet-2.74/src/BulletMultiThreaded/SpuNarrowPhaseCollisionTask -I../bullet-2.74/src/BulletMultiThreaded/SpuRaycastTask -I../bullet-2.74/src/BulletMultiThreaded/SpuSampleTask -I../bullet-2.74/src/BulletMultiThreaded/SpuSolverTask -I../bullet-2.74/src/BulletMultiThreaded/vectormath -I../bullet-2.74/src/BulletSoftBody/BULLET_PHYSICS.build -I../bullet-2.74/src/BulletSoftBody/CMakeFiles -I../bullet-2.74/src/BulletSoftBody/CMakeScripts -I../bullet-2.74/src/BulletSoftBody/Debug -I../bullet-2.74/src/LinearMath/BULLET_PHYSICS.build -I../bullet-2.74/src/LinearMath/CMakeFiles -I../bullet-2.74/src/LinearMath/CMakeScripts -I../bullet-2.74/src/LinearMath/Debug -I../bullet-2.74/src/LinearMath/ibmsdk -I../bullet-2.74/src/BulletCollision/BULLET_PHYSICS.build/Debug -I../bullet-2.74/src/BulletDynamics/BULLET_PHYSICS.build/Debug -I../bullet-2.74/src/BulletMultiThreaded/BULLET_PHYSICS.build/Debug -I../bullet-2.74/src/BulletMultiThreaded/vectormath/scalar -I../bullet-2.74/src/BulletSoftBody/BULLET_PHYSICS.build/Debug -I../bullet-2.74/src/LinearMath/BULLET_PHYSICS.build/Debug -I../bullet-2.74/src/BulletCollision/BULLET_PHYSICS.build/Debug/libBulletCollision.a.build -I../bullet-2.74/src/BulletDynamics/BULLET_PHYSICS.build/Debug/libBulletDynamics.a.build -I../bullet-2.74/src/BulletMultiThreaded/BULLET_PHYSICS.build/Debug/libBulletMultiThreaded.a.build -I../bullet-2.74/src/BulletMultiThreaded/vectormath/scalar/cpp -I../bullet-2.74/src/BulletSoftBody/BULLET_PHYSICS.build/Debug/libBulletSoftBody.a.build -I../bullet-2.74/src/LinearMath/BULLET_PHYSICS.build/Debug/libLinearMath.a.build -I../bullet-2.74/src/BulletCollision/BULLET_PHYSICS.build/Debug/libBulletCollision.a.build/Objects-normal -I../bullet-2.74/src/BulletDynamics/BULLET_PHYSICS.build/Debug/libBulletDynamics.a.build/Objects-normal -I../bullet-2.74/src/BulletMultiThreaded/BULLET_PHYSICS.build/Debug/libBulletMultiThreaded.a.build/Objects-normal -I../bullet-2.74/src/BulletSoftBody/BULLET_PHYSICS.build/Debug/libBulletSoftBody.a.build/Objects-normal -I../bullet-2.74/src/LinearMath/BULLET_PHYSICS.build/Debug/libLinearMath.a.build/Objects-normal -I../bullet-2.74/src/BulletCollision/BULLET_PHYSICS.build/Debug/libBulletCollision.a.build/Objects-normal/i386 -I../bullet-2.74/src/BulletDynamics/BULLET_PHYSICS.build/Debug/libBulletDynamics.a.build/Objects-normal/i386 -I../bullet-2.74/src/BulletMultiThreaded/BULLET_PHYSICS.build/Debug/libBulletMultiThreaded.a.build/Objects-normal/i386 -I../bullet-2.74/src/BulletSoftBody/BULLET_PHYSICS.build/Debug/libBulletSoftBody.a.build/Objects-normal/i386 -I../bullet-2.74/src/LinearMath/BULLET_PHYSICS.build/Debug/libLinearMath.a.build/Objects-normal/i386 -I/Users/andris/Documents/andrisDocuments/BulletTest06(cocoa)/build/BulletTest06(cocoa).build/Debug/BulletTest06(cocoa).build/DerivedSources -include /var/folders/ST/STbVh93KGXCa7KdzbPZKLU+++TI/-Caches-/com.apple.Xcode.501/SharedPrecompiledHeaders/BulletTest06(cocoa)_Prefix-ggozohnzbubzjkdrudvsnwotohhn/BulletTest06(cocoa)_Prefix.pch -c /Users/andris/Documents/andrisDocuments/BulletTest06(cocoa)/main.m -o /Users/andris/Documents/andrisDocuments/BulletTest06(cocoa)/build/BulletTest06(cocoa).build/Debug/BulletTest06(cocoa).build/Objects-normal/i386/main.o
In file included from ../bullet-2.74/src/btBulletCollisionCommon.h:22,
from ../bullet-2.74/src/btBulletDynamicsCommon.h:20,
from /Users/andris/Documents/andrisDocuments/BulletTest06(cocoa)/main.m:10:
../bullet-2.74/src/BulletCollision/CollisionDispatch/btCollisionWorld.h:67: error: syntax error before 'btStackAlloc'
../bullet-2.74/src/BulletCollision/CollisionDispatch/btCollisionWorld.h:67: warning: type defaults to 'int' in declaration of 'btStackAlloc'
../bullet-2.74/src/BulletCollision/CollisionDispatch/btCollisionWorld.h:67: warning: data definition has no type or storage class
../bullet-2.74/src/BulletCollision/CollisionDispatch/btCollisionWorld.h:68: error: syntax error before 'btCollisionShape'
../bullet-2.74/src/BulletCollision/CollisionDispatch/btCollisionWorld.h:68: warning: type defaults to 'int' in declaration of 'btCollisionShape'
../bullet-2.74/src/BulletCollision/CollisionDispatch/btCollisionWorld.h:68: warning: data definition has no type or storage class
../bullet-2.74/src/BulletCollision/CollisionDispatch/btCollisionWorld.h:69: error: syntax error before 'btConvexShape'
../bullet-2.74/src/BulletCollision/CollisionDispatch/btCollisionWorld.h:69: warning: type defaults to 'int' in declaration of 'btConvexShape'
../bullet-2.74/src/BulletCollision/CollisionDispatch/btCollisionWorld.h:69: warning: data definition has no type or storage class
../bullet-2.74/src/BulletCollision/CollisionDispatch/btCollisionWorld.h:70: error: syntax error before 'btBroadphaseInterface'
../bullet-2.74/src/BulletCollision/CollisionDispatch/btCollisionWorld.h:70: warning: type defaults to 'int' in declaration of 'btBroadphaseInterface'
../bullet-2.74/src/BulletCollision/CollisionDispatch/btCollisionWorld.h:70: warning: data definition has no type or storage class
MamboDave
Posts: 5
Joined: Tue Nov 11, 2008 2:20 pm

Re: please someone share a working xcode example

Post by MamboDave »

Hi,

I initially had the same error as at the very top of this topic after building frameworks with cmake. Starting with a clean src extract I then got a load of different errors related to missing objects.

So starting with a clean 2.74 extract, I've managed to get the project to build by first adding the /Extras/GIMPACT folder from a previous version of bullet (2.72 as I seem to remember this being missing in 2.73 also) to bullet 2.74/Extras/. Don't forget to also drag this into the XCode project in order for these binaries to be built.

I got errors about BulletCollision/CollisionDispatch/btActivatingCollisionAlgorithm. Almost the same story. Seems to be a new source file in 2.74 that hasn't been added to the project yet. Doing so got rid of a few more errors for me.

The final errors were missing ForkLiftDemo binaries. Including these files gives a namespace conflict so I just went into DemoEntries.cpp and removed all references to it.

Hopefully this will fix your build problems.

Dave
zalavariandris
Posts: 12
Joined: Wed Feb 18, 2009 12:31 am

Re: please someone share a working xcode example

Post by zalavariandris »

thanks for the answares! But looks like it's not the solution.

I was downloaded SIO2.
I have deleted all SIO2 source files exept bullet
and it works fine , I was made a simple simmulation too.

But was able to generate the same errors.
the errors appears when I want to include bullet in to my own classes. And ofcourse a really like to.
I'm doing something wrong with my classes, but dont know what.
please check out the attached xcode project.
If this woud work, i think all the others will work.

I made notes after the bullet lines not working.
You can find these at: file: line:
andNode.h 6
andNode.h 14
andNode.m 2
andNode.m 11
http://sites.google.com/site/andpublic/ ... edirects=0
zalavariandris
Posts: 12
Joined: Wed Feb 18, 2009 12:31 am

Re: please someone share a working xcode example

Post by zalavariandris »

someone please check this source out. I must missed out something.
Cant get this work. I woud really like make this app.