Missing btCollisionObjectWrapper.h in OSX Xcode build

Post Reply
User avatar
SynapticBytes
Posts: 74
Joined: Thu Feb 10, 2011 8:27 pm

Missing btCollisionObjectWrapper.h in OSX Xcode build

Post by SynapticBytes » Sun Dec 09, 2012 3:45 am

Hi,

I'm trying to build the bullet libraries on my iMac (10.7) for inclusion in my project and followed the Wiki instructions here http://bulletphysics.org/mediawiki-1.5. ... om_scratch.

After running the CMAKE etc to build the frameworks, I've dragged the LinearMath, BulletCollision and BulletDynamics top level Framework folders from the Library directory into my project, and attempted to build. It runs along fine until it comes to the btManifoldResult.h and then fails on the line

Code: Select all

#include "BulletCollision/CollisionDispatch/btCollisionObjectWrapper.h"
Looking through the Framework library headers, there's no btCollisionObjectWrapper.h. It is the the original source file at .....\bullet-2.81-rev2613\src\BulletCollision\CollisionDispatch\ so I assume something failed in the CMake.

Would that be correct? I'm no build guru. I've seen mention of Premake, so I'll try and find those instructions and see if it makes any difference, although I'm not sure how to wipe the library slate clean and restart.

Anyone have any other suggestions what may be wrong?

Thanks.

User avatar
SynapticBytes
Posts: 74
Joined: Thu Feb 10, 2011 8:27 pm

Re: Missing btCollisionObjectWrapper.h in OSX Xcode build

Post by SynapticBytes » Sun Dec 09, 2012 4:33 am

OK well the Premake only seems to build the demo's locally, not setup the framework.

So I went back to looking at the cmake logs and following the trail backwards, I assume the \bullet\src\BulletCollision\CMakeLists.txt should have the btCollisionObjectWrapper.h in this section

Code: Select all

SET(CollisionDispatch_HDRS
	CollisionDispatch/btActivatingCollisionAlgorithm.h
	CollisionDispatch/btBoxBoxCollisionAlgorithm.h
	CollisionDispatch/btBox2dBox2dCollisionAlgorithm.h
	CollisionDispatch/btBoxBoxDetector.h
	CollisionDispatch/btCollisionConfiguration.h
	CollisionDispatch/btCollisionCreateFunc.h
	CollisionDispatch/btCollisionDispatcher.h
	CollisionDispatch/btCollisionObject.h
	CollisionDispatch/btCollisionWorld.h
	CollisionDispatch/btCompoundCollisionAlgorithm.h
	CollisionDispatch/btConvexConcaveCollisionAlgorithm.h
	CollisionDispatch/btConvexConvexAlgorithm.h
	CollisionDispatch/btConvex2dConvex2dAlgorithm.h
	CollisionDispatch/btConvexPlaneCollisionAlgorithm.h
	CollisionDispatch/btDefaultCollisionConfiguration.h
	CollisionDispatch/btEmptyCollisionAlgorithm.h
	CollisionDispatch/btGhostObject.h
	CollisionDispatch/btManifoldResult.h
	CollisionDispatch/btSimulationIslandManager.h
	CollisionDispatch/btSphereBoxCollisionAlgorithm.h
	CollisionDispatch/btSphereSphereCollisionAlgorithm.h
	CollisionDispatch/btSphereTriangleCollisionAlgorithm.h
	CollisionDispatch/btUnionFind.h
	CollisionDispatch/SphereTriangleDetector.h
)
but as you can see, it doesn't. Is this an oversight, or is there some reason it shouldn't be in there? I not the comments in the header say it's internal and probably shouldn't be used, in which case why is it in the btManifoldResult.h header? I assume either it should be removed from the manifold header, or added to the Cmake list.

Oh, this is version 2.81-rev2613

Which answer is correct? Thanks.

User avatar
Erwin Coumans
Site Admin
Posts: 4073
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA
Contact:

Re: Missing btCollisionObjectWrapper.h in OSX Xcode build

Post by Erwin Coumans » Mon Dec 10, 2012 7:40 pm

Code: Select all

 Is this an oversight, or is there some reason it shouldn't be in there?
Installing Bullet system wide (using shared libraries or frameworks) is not actively supported, so it relies on people contributing.
If you have a patch, can you consider sharing it through the issue tracker?
https://code.google.com/p/bullet/issues/list

For most users, it is recommended to simply add the Bullet source code files to your project and build and link it statically, along with other C++ source code files.

User avatar
SynapticBytes
Posts: 74
Joined: Thu Feb 10, 2011 8:27 pm

Re: Missing btCollisionObjectWrapper.h in OSX Xcode build

Post by SynapticBytes » Mon Dec 10, 2012 8:17 pm

Erwin Coumans wrote:

Code: Select all

 Is this an oversight, or is there some reason it shouldn't be in there?
Installing Bullet system wide (using shared libraries or frameworks) is not actively supported, so it relies on people contributing.
If you have a patch, can you consider sharing it through the issue tracker?
https://code.google.com/p/bullet/issues/list

For most users, it is recommended to simply add the Bullet source code files to your project and build and link it statically, along with other C++ source code files.
OK Thanks. I have also been trying to add the source files instead, and am having some issues compiling. That may be my lack of Xcode experience however. I thought I'd finally got most of them solved, but am getting some "Undefined symbols for architecture x86_64:" errors such as

Code: Select all

 "_maxdot_large(float const*, float const*, unsigned long, float*)", referenced from:
      __ZL17FindMaxSeparationPiPK12btBox2dShapeRK11btTransformS2_S5_ in btBox2dBox2dCollisionAlgorithm.o
      btConvexHullShape::localGetSupportingVertexWithoutMargin(btVector3 const&) const in btConvexHullShape.o
      btConvexHullShape::batchedUnitVectorGetSupportingVertexWithoutMargin(btVector3 const*, btVector3*, int) const in btConvexHullShape.o
      btConvexPointCloudShape::localGetSupportingVertexWithoutMargin(btVector3 const&) const in btConvexPointCloudShape.o
      btConvexPointCloudShape::batchedUnitVectorGetSupportingVertexWithoutMargin(btVector3 const*, btVector3*, int) const in btConvexPointCloudShape.o
      __ZL17convexHullSupportRK9btVector3PS0_iS1_ in btConvexShape.o
      btMultiSphereShape::localGetSupportingVertexWithoutMargin(btVector3 const&) const in btMultiSphereShape.o
      ...
  "_mindot_large(float const*, float const*, unsigned long, float*)", referenced from:
      __ZL14EdgeSeparationPK12btBox2dShapeRK11btTransformiS1_S4_ in btBox2dBox2dCollisionAlgorithm.o
  "btAlignedFreeInternal(void*)", referenced from:
      setupRigidBody(S3DX::AIVariable, float, btCollisionShape*, S3DX::AIVariable) in sbPhysics.o
      Callback_sbPhysics_createShape2D(int, S3DX::AIVariable const*, S3DX::AIVariable*) in sbPhysics.o
      Callback_sbPhysics_addHinge(int, S3DX::AIVariable const*, S3DX::AIVariable*) in sbPhysics.o
      Callback_sbPhysics_addPivot(int, S3DX::AIVariable const*, S3DX::AIVariable*) in sbPhysics.o
      Callback_sbPhysics_createCapsule(int, S3DX::AIVariable const*, S3DX::AIVariable*) in sbPhysics.o
      Callback_sbPhysics_createCylinder(int, S3DX::AIVariable const*, S3DX::AIVariable*) in sbPhysics.o
      Callback_sbPhysics_createBox2D(int, S3DX::AIVariable const*, S3DX::AIVariable*) in sbPhysics.o
and about 15 other similar errors. I'll keep working on it, but is this anything obvious?

*EDIT*

Well I got it to compile by changing the Mach-O type to "Static Library". Whether that means it actually works or not, I'm not sure.

Post Reply