Demo won't compile - help! [Solved]

nano
Posts: 6
Joined: Sun Oct 28, 2007 2:45 am

Demo won't compile - help! [Solved]

Post by nano »

Hi there,

I'm trying to compile the Bullet (in Irrlicht) demo and i'm getting the following errors:

Code: Select all

c:\Irrlicht\Bullet\irrlicht_bullet_demo_stats\BulletPhysicsWorld.cpp(32): error C2512: 'btCollisionDispatcher' : no appropriate default constructor available
c:\Irrlicht\Bullet\irrlicht_bullet_demo_stats\BulletPhysicsWorld.cpp(36): error C2440: '=' : cannot convert from 'btAxisSweep3 *' to 'btOverlappingPairCache *'
        Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
c:\Irrlicht\Bullet\irrlicht_bullet_demo_stats\BulletPhysicsWorld.cpp(38): error C2664: 'btDiscreteDynamicsWorld::btDiscreteDynamicsWorld(btDispatcher *,btBroadphaseInterface *,btConstraintSolver *)' : cannot convert parameter 2 from 'btOverlappingPairCache *' to 'btBroadphaseInterface *'
        Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
Any idea why i'd be getting these? I have Bullet 2.63 and Irrlicht 1.3.1. I've built the libraries from the msvc/71/ directory is this incorrect?

Any help would be most appreciated!
Last edited by nano on Mon Oct 29, 2007 2:36 pm, edited 1 time in total.
hiker
Posts: 83
Joined: Tue Oct 24, 2006 11:52 pm
Location: Australia

Re: Demo won't compile - help!

Post by hiker »

Hi,

I think the Irrlicht demo was written for an older version of bullet. Since then the API has slightly changed. Have a look at (e.g.) the vehicle demo and how bullet is initialised for newer bullet version, and change the irrlicht demo appropriately - it's just a two or three line change.

Cheers,
Joerg
nano
Posts: 6
Joined: Sun Oct 28, 2007 2:45 am

Re: Demo won't compile - help!

Post by nano »

When i try to compile the Vehicle example i get:
VehicleDemo error LNK2001: unresolved external symbol "public: virtual __thiscall DemoApplication::~DemoApplication(void)" (??1DemoApplication@@UAE@XZ)
VehicleDemo error LNK2001: unresolved external symbol "public: virtual class btVector3 __thiscall btConvexInternalShape::localGetSupportingVertex(class btVector3 const &)const " (?localGetSupportingVertex@btConvexInternalShape@@UBE?AVbtVector3@@ABV2@@Z)
VehicleDemo error LNK2001: unresolved external symbol "public: virtual float __thiscall btCollisionShape::getAngularMotionDisc(void)const " (?getAngularMotionDisc@btCollisionShape@@UBEMXZ)
VehicleDemo error LNK2001: unresolved external symbol "public: virtual void * __thiscall btDefaultVehicleRaycaster::castRay(class btVector3 const &,class btVector3 const &,struct btVehicleRaycaster::btVehicleRaycasterResult &)" (?castRay@btDefaultVehicleRaycaster@@UAEPAXABVbtVector3@@0AAUbtVehicleRaycasterResult@btVehicleRaycaster@@@Z)
VehicleDemo error LNK2001: unresolved external symbol "public: virtual void __thiscall btBoxShape::calculateLocalInertia(float,class btVector3 &)const " (?calculateLocalInertia@btBoxShape@@UBEXMAAVbtVector3@@@Z)
VehicleDemo error LNK2001: unresolved external symbol "public: virtual void __thiscall btBoxShape::getAabb(class btTransform const &,class btVector3 &,class btVector3 &)const " (?getAabb@btBoxShape@@UBEXABVbtTransform@@AAVbtVector3@@1@Z)
VehicleDemo error LNK2001: unresolved external symbol "public: virtual void __thiscall btCollisionShape::getBoundingSphere(class btVector3 &,float &)const " (?getBoundingSphere@btCollisionShape@@UBEXAAVbtVector3@@AAM@Z)
VehicleDemo error LNK2001: unresolved external symbol "public: virtual void __thiscall btConvexInternalShape::getAabbSlow(class btTransform const &,class btVector3 &,class btVector3 &)const " (?getAabbSlow@btConvexInternalShape@@UBEXABVbtTransform@@AAVbtVector3@@1@Z)
VehicleDemo error LNK2001: unresolved external symbol "public: virtual void __thiscall DemoApplication::keyboardCallback(unsigned char,int,int)" (?keyboardCallback@DemoApplication@@UAEXEHH@Z)
VehicleDemo error LNK2001: unresolved external symbol "public: virtual void __thiscall DemoApplication::mouseFunc(int,int,int,int)" (?mouseFunc@DemoApplication@@UAEXHHHH@Z)
VehicleDemo error LNK2001: unresolved external symbol "public: virtual void __thiscall DemoApplication::mouseMotionFunc(int,int)" (?mouseMotionFunc@DemoApplication@@UAEXHH@Z)
VehicleDemo error LNK2001: unresolved external symbol "public: virtual void __thiscall DemoApplication::reshape(int,int)" (?reshape@DemoApplication@@UAEXHH@Z)
VehicleDemo error LNK2019: unresolved external symbol "float gJitterVelocityDampingFactor" (?gJitterVelocityDampingFactor@@3MA) referenced in function "public: void __thiscall VehicleDemo::setupPhysics(void)" (?setupPhysics@VehicleDemo@@QAEXXZ)
VehicleDemo error LNK2019: unresolved external symbol "int __cdecl glutmain(int,char * *,int,int,char const *,class DemoApplication *)" (?glutmain@@YAHHPAPADHHPBDPAVDemoApplication@@@Z) referenced in function _main
VehicleDemo error LNK2019: unresolved external symbol "public: __thiscall btAxisSweep3::btAxisSweep3(class btVector3 const &,class btVector3 const &,unsigned short,class btOverlappingPairCache *)" (??0btAxisSweep3@@QAE@ABVbtVector3@@0GPAVbtOverlappingPairCache@@@Z) referenced in function "public: void __thiscall VehicleDemo::setupPhysics(void)" (?setupPhysics@VehicleDemo@@QAEXXZ)
VehicleDemo error LNK2019: unresolved external symbol "public: __thiscall btBvhTriangleMeshShape::btBvhTriangleMeshShape(class btStridingMeshInterface *,bool,bool)" (??0btBvhTriangleMeshShape@@QAE@PAVbtStridingMeshInterface@@_N1@Z) referenced in function "public: void __thiscall VehicleDemo::setupPhysics(void)" (?setupPhysics@VehicleDemo@@QAEXXZ)
VehicleDemo error LNK2019: unresolved external symbol "public: __thiscall btCollisionDispatcher::btCollisionDispatcher(class btCollisionConfiguration *)" (??0btCollisionDispatcher@@QAE@PAVbtCollisionConfiguration@@@Z) referenced in function "public: void __thiscall VehicleDemo::setupPhysics(void)" (?setupPhysics@VehicleDemo@@QAEXXZ)
VehicleDemo error LNK2019: unresolved external symbol "public: __thiscall btCompoundShape::btCompoundShape(void)" (??0btCompoundShape@@QAE@XZ) referenced in function "public: void __thiscall VehicleDemo::setupPhysics(void)" (?setupPhysics@VehicleDemo@@QAEXXZ)
VehicleDemo error LNK2019: unresolved external symbol "public: __thiscall btCylinderShapeX::btCylinderShapeX(class btVector3 const &)" (??0btCylinderShapeX@@QAE@ABVbtVector3@@@Z) referenced in function "public: virtual void __thiscall VehicleDemo::renderme(void)" (?renderme@VehicleDemo@@UAEXXZ)
VehicleDemo error LNK2019: unresolved external symbol "public: __thiscall btDefaultCollisionConfiguration::btDefaultCollisionConfiguration(void)" (??0btDefaultCollisionConfiguration@@QAE@XZ) referenced in function "public: void __thiscall VehicleDemo::setupPhysics(void)" (?setupPhysics@VehicleDemo@@QAEXXZ)
VehicleDemo error LNK2019: unresolved external symbol "public: __thiscall btDiscreteDynamicsWorld::btDiscreteDynamicsWorld(class btDispatcher *,class btBroadphaseInterface *,class btConstraintSolver *)" (??0btDiscreteDynamicsWorld@@QAE@PAVbtDispatcher@@PAVbtBroadphaseInterface@@PAVbtConstraintSolver@@@Z) referenced in function "public: void __thiscall VehicleDemo::setupPhysics(void)" (?setupPhysics@VehicleDemo@@QAEXXZ)
VehicleDemo error LNK2019: unresolved external symbol "public: __thiscall btPolyhedralConvexShape::btPolyhedralConvexShape(void)" (??0btPolyhedralConvexShape@@QAE@XZ) referenced in function "public: __thiscall btBoxShape::btBoxShape(class btVector3 const &)" (??0btBoxShape@@QAE@ABVbtVector3@@@Z)
VehicleDemo error LNK2019: unresolved external symbol "public: __thiscall btRaycastVehicle::btRaycastVehicle(class btRaycastVehicle::btVehicleTuning const &,class btRigidBody *,struct btVehicleRaycaster *)" (??0btRaycastVehicle@@QAE@ABVbtVehicleTuning@0@PAVbtRigidBody@@PAUbtVehicleRaycaster@@@Z) referenced in function "public: void __thiscall VehicleDemo::setupPhysics(void)" (?setupPhysics@VehicleDemo@@QAEXXZ)
VehicleDemo error LNK2019: unresolved external symbol "public: __thiscall btSequentialImpulseConstraintSolver::btSequentialImpulseConstraintSolver(void)" (??0btSequentialImpulseConstraintSolver@@QAE@XZ) referenced in function "public: void __thiscall VehicleDemo::setupPhysics(void)" (?setupPhysics@VehicleDemo@@QAEXXZ)
VehicleDemo error LNK2019: unresolved external symbol "public: __thiscall btTriangleIndexVertexArray::btTriangleIndexVertexArray(int,int *,int,int,float *,int)" (??0btTriangleIndexVertexArray@@QAE@HPAHHHPAMH@Z) referenced in function "public: void __thiscall VehicleDemo::setupPhysics(void)" (?setupPhysics@VehicleDemo@@QAEXXZ)
VehicleDemo error LNK2019: unresolved external symbol "public: __thiscall DemoApplication::DemoApplication(void)" (??0DemoApplication@@QAE@XZ) referenced in function "public: __thiscall VehicleDemo::VehicleDemo(void)" (??0VehicleDemo@@QAE@XZ)
VehicleDemo error LNK2019: unresolved external symbol "public: __thiscall GLDebugDrawer::GLDebugDrawer(void)" (??0GLDebugDrawer@@QAE@XZ) referenced in function _$E7
VehicleDemo error LNK2019: unresolved external symbol "public: class btRigidBody * __thiscall DemoApplication::localCreateRigidBody(float,class btTransform const &,class btCollisionShape *)" (?localCreateRigidBody@DemoApplication@@QAEPAVbtRigidBody@@MABVbtTransform@@PAVbtCollisionShape@@@Z) referenced in function "public: void __thiscall VehicleDemo::setupPhysics(void)" (?setupPhysics@VehicleDemo@@QAEXXZ)
VehicleDemo error LNK2019: unresolved external symbol "public: static void __cdecl GL_ShapeDrawer::drawOpenGL(float *,class btCollisionShape const *,class btVector3 const &,int)" (?drawOpenGL@GL_ShapeDrawer@@SAXPAMPBVbtCollisionShape@@ABVbtVector3@@H@Z) referenced in function "public: virtual void __thiscall VehicleDemo::renderme(void)" (?renderme@VehicleDemo@@UAEXXZ)
VehicleDemo error LNK2019: unresolved external symbol "public: struct btWheelInfo & __thiscall btRaycastVehicle::addWheel(class btVector3 const &,class btVector3 const &,class btVector3 const &,float,float,class btRaycastVehicle::btVehicleTuning const &,bool)" (?addWheel@btRaycastVehicle@@QAEAAUbtWheelInfo@@ABVbtVector3@@00MMABVbtVehicleTuning@1@_N@Z) referenced in function "public: void __thiscall VehicleDemo::setupPhysics(void)" (?setupPhysics@VehicleDemo@@QAEXXZ)
VehicleDemo error LNK2019: unresolved external symbol "public: struct btWheelInfo & __thiscall btRaycastVehicle::getWheelInfo(int)" (?getWheelInfo@btRaycastVehicle@@QAEAAUbtWheelInfo@@H@Z) referenced in function "public: void __thiscall VehicleDemo::setupPhysics(void)" (?setupPhysics@VehicleDemo@@QAEXXZ)
VehicleDemo error LNK2019: unresolved external symbol "public: virtual void __thiscall btConvexInternalShape::setLocalScaling(class btVector3 const &)" (?setLocalScaling@btConvexInternalShape@@UAEXABVbtVector3@@@Z) referenced in function "public: virtual void __thiscall btBoxShape::setLocalScaling(class btVector3 const &)" (?setLocalScaling@btBoxShape@@UAEXABVbtVector3@@@Z)
VehicleDemo error LNK2019: unresolved external symbol "public: virtual void __thiscall DemoApplication::renderme(void)" (?renderme@DemoApplication@@UAEXXZ) referenced in function "public: virtual void __thiscall VehicleDemo::renderme(void)" (?renderme@VehicleDemo@@UAEXXZ)
VehicleDemo error LNK2019: unresolved external symbol "public: virtual void __thiscall DemoApplication::specialKeyboard(int,int,int)" (?specialKeyboard@DemoApplication@@UAEXHHH@Z) referenced in function "public: virtual void __thiscall VehicleDemo::specialKeyboard(int,int,int)" (?specialKeyboard@VehicleDemo@@UAEXHHH@Z)
VehicleDemo error LNK2019: unresolved external symbol "public: virtual void __thiscall DemoApplication::specialKeyboardUp(int,int,int)" (?specialKeyboardUp@DemoApplication@@UAEXHHH@Z) referenced in function "public: virtual void __thiscall VehicleDemo::specialKeyboardUp(int,int,int)" (?specialKeyboardUp@VehicleDemo@@UAEXHHH@Z)
VehicleDemo error LNK2019: unresolved external symbol "public: virtual void __thiscall GLDebugDrawer::setDebugMode(int)" (?setDebugMode@GLDebugDrawer@@UAEXH@Z) referenced in function "public: virtual void __thiscall VehicleDemo::renderme(void)" (?renderme@VehicleDemo@@UAEXXZ)
VehicleDemo error LNK2019: unresolved external symbol "public: void __thiscall btCollisionObject::setActivationState(int)" (?setActivationState@btCollisionObject@@QAEXH@Z) referenced in function "public: void __thiscall VehicleDemo::setupPhysics(void)" (?setupPhysics@VehicleDemo@@QAEXXZ)
VehicleDemo error LNK2019: unresolved external symbol "public: void __thiscall btCompoundShape::addChildShape(class btTransform const &,class btCollisionShape *)" (?addChildShape@btCompoundShape@@QAEXABVbtTransform@@PAVbtCollisionShape@@@Z) referenced in function "public: void __thiscall VehicleDemo::setupPhysics(void)" (?setupPhysics@VehicleDemo@@QAEXXZ)
VehicleDemo error LNK2019: unresolved external symbol "public: void __thiscall btOverlappingPairCache::cleanProxyFromPairs(struct btBroadphaseProxy *,class btDispatcher *)" (?cleanProxyFromPairs@btOverlappingPairCache@@QAEXPAUbtBroadphaseProxy@@PAVbtDispatcher@@@Z) referenced in function "public: virtual void __thiscall VehicleDemo::clientResetScene(void)" (?clientResetScene@VehicleDemo@@UAEXXZ)
VehicleDemo error LNK2019: unresolved external symbol "public: void __thiscall btRaycastVehicle::applyEngineForce(float,int)" (?applyEngineForce@btRaycastVehicle@@QAEXMH@Z) referenced in function "public: virtual void __thiscall VehicleDemo::clientMoveAndDisplay(void)" (?clientMoveAndDisplay@VehicleDemo@@UAEXXZ)
VehicleDemo error LNK2019: unresolved external symbol "public: void __thiscall btRaycastVehicle::resetSuspension(void)" (?resetSuspension@btRaycastVehicle@@QAEXXZ) referenced in function "public: virtual void __thiscall VehicleDemo::clientResetScene(void)" (?clientResetScene@VehicleDemo@@UAEXXZ)
VehicleDemo error LNK2019: unresolved external symbol "public: void __thiscall btRaycastVehicle::setBrake(float,int)" (?setBrake@btRaycastVehicle@@QAEXMH@Z) referenced in function "public: virtual void __thiscall VehicleDemo::clientMoveAndDisplay(void)" (?clientMoveAndDisplay@VehicleDemo@@UAEXXZ)
VehicleDemo error LNK2019: unresolved external symbol "public: void __thiscall btRaycastVehicle::setSteeringValue(float,int)" (?setSteeringValue@btRaycastVehicle@@QAEXMH@Z) referenced in function "public: virtual void __thiscall VehicleDemo::clientMoveAndDisplay(void)" (?clientMoveAndDisplay@VehicleDemo@@UAEXXZ)
VehicleDemo error LNK2019: unresolved external symbol "public: void __thiscall btRaycastVehicle::updateWheelTransform(int,bool)" (?updateWheelTransform@btRaycastVehicle@@QAEXH_N@Z) referenced in function "public: virtual void __thiscall VehicleDemo::renderme(void)" (?renderme@VehicleDemo@@UAEXXZ)
VehicleDemo error LNK2019: unresolved external symbol "public: void __thiscall btRigidBody::setCenterOfMassTransform(class btTransform const &)" (?setCenterOfMassTransform@btRigidBody@@QAEXABVbtTransform@@@Z) referenced in function "public: virtual void __thiscall VehicleDemo::clientResetScene(void)" (?clientResetScene@VehicleDemo@@UAEXXZ)
VehicleDemo error LNK2019: unresolved external symbol "public: void __thiscall DemoApplication::setCameraDistance(float)" (?setCameraDistance@DemoApplication@@QAEXM@Z) referenced in function "public: void __thiscall VehicleDemo::setupPhysics(void)" (?setupPhysics@VehicleDemo@@QAEXXZ)
VehicleDemo error LNK2019: unresolved external symbol "void * __cdecl btAlignedAlloc(unsigned int,int)" (?btAlignedAlloc@@YAPAXIH@Z) referenced in function "public: static void * __cdecl btConvexShape::operator new(unsigned int)" (??2btConvexShape@@SAPAXI@Z)
VehicleDemo error LNK2019: unresolved external symbol "void __cdecl btAlignedFree(void *)" (?btAlignedFree@@YAXPAX@Z) referenced in function "public: static void __cdecl btConvexShape::operator delete(void *)" (??3btConvexShape@@SAXPAX@Z)
VehicleDemo fatal error LNK1120: 48 unresolved externals
hiker
Posts: 83
Joined: Tue Oct 24, 2006 11:52 pm
Location: Australia

Re: Demo won't compile - help!

Post by hiker »

Did you compile the essential bullet libs first (collision, dynamics, math), and the OpenGL Demo application? If you use the included project files (I assume you are using windows?) and build everything (wksbullet or so), this should take care of that.

Not sure about your problem with the vehicle demo, this is a different issue then your first problem (which from my experience is based on using a newer bullet version with code written for an older bullet version). You might try an older version, 2.5? or so (I am not sure when the initialisation was exactly changed), this should compile your irrlicht demo. Sorry, that's all I know.

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

Re: Demo won't compile - help!

Post by Erwin Coumans »

Indeed, as hiker mentions, the Bullet API slightly changed.

Please compare this code snippet, from the latest demos, and try to locate/replace this in your project:

Code: Select all


 btDefaultCollisionConfiguration* collisionConfiguration = new btDefaultCollisionConfiguration();
        btCollisionDispatcher* dispatcher = new btCollisionDispatcher(collisionConfiguration);
        btVector3 worldMin(-1000,-1000,-1000);
        btVector3 worldMax(1000,1000,1000);
        btBroadphaseInterface* pairCache = new btAxisSweep3(worldMin,worldMax);
        btConstraintSolver* constraintSolver = new btSequentialImpulseConstraintSolver();
        m_dynamicsWorld = new btDiscreteDynamicsWorld(dispatcher,pairCache,constraintSolver,collisionConfiguration);
Make sure the worldMin/worldMax encapsulated your world, but don't make it extremely large.
Hope this helps,
Erwin
nano
Posts: 6
Joined: Sun Oct 28, 2007 2:45 am

Re: Demo won't compile - help!

Post by nano »

I took Hiker's advice and tried to switch to a different version. I got 2.50b and compiled all the libs and now i'm getting these errors (less is better though!):

For VehicleDemo:
VehicleDemo error LNK2020: unresolved token (0A000003) gJitterVelocityDampingFactor
VehicleDemo error LNK2020: unresolved token (0A000011) btRaycastVehicle.updateWheelTransform
VehicleDemo error LNK2020: unresolved token (0A000013) btRaycastVehicle.getWheelInfo
VehicleDemo error LNK2020: unresolved token (0A00002E) DemoApplication.__dtor
VehicleDemo fatal error LNK1120: 4 unresolved externals
For Irrlicht Demo:
irrlicht_bullet_demo error LNK2001: unresolved external symbol "public: virtual void __thiscall btBoxShape::calculateLocalInertia(float,class btVector3 &)const " (?calculateLocalInertia@btBoxShape@@UBEXMAAVbtVector3@@@Z)
irrlicht_bullet_demo error LNK2001: unresolved external symbol "public: virtual void __thiscall btConvexInternalShape::getAabbSlow(class btTransform const &,class btVector3 &,class btVector3 &)const " (?getAabbSlow@btConvexInternalShape@@UBEXABVbtTransform@@AAVbtVector3@@1@Z)
irrlicht_bullet_demo error LNK2001: unresolved external symbol "void * __cdecl btAlignedAlloc(unsigned int,int)" (?btAlignedAlloc@@YAPAXIH@Z)
irrlicht_bullet_demo error LNK2019: unresolved external symbol "public: __thiscall btBvhTriangleMeshShape::btBvhTriangleMeshShape(class btStridingMeshInterface *,bool,bool)" (??0btBvhTriangleMeshShape@@QAE@PAVbtStridingMeshInterface@@_N1@Z) referenced in function "public: __thiscall CTerrain::CTerrain(char const *)" (??0CTerrain@@QAE@PBD@Z)
irrlicht_bullet_demo error LNK2019: unresolved external symbol "public: virtual void __thiscall btConvexInternalShape::setLocalScaling(class btVector3 const &)" (?setLocalScaling@btConvexInternalShape@@UAEXABVbtVector3@@@Z) referenced in function "public: virtual void __thiscall btBoxShape::setLocalScaling(class btVector3 const &)" (?setLocalScaling@btBoxShape@@UAEXABVbtVector3@@@Z)
irrlicht_bullet_demo error LNK2019: unresolved external symbol "void * __cdecl btAlignedAlloc(unsigned int,int)" (?btAlignedAlloc@@YAPAXIH@Z) referenced in function "public: int * __thiscall btAlignedAllocator<int,16>::allocate(int,int const * *)" (?allocate@?$btAlignedAllocator@H$0BA@@@QAEPAHHPAPBH@Z)
irrlicht_bullet_demo fatal error LNK1120: 5 unresolved externals
:?

Edit: Oh yeah, it may help to list my include directories:

\Bullet\bullet-2.50b\src
\Bullet\bullet-2.50b\include
\Bullet\bullet-2.50b\Extras
\Bullet\bullet-2.50b\Demos\OpenGL

I added these particular directories because i was getting errors requiring particular files from each of them, but i assume my link errors would result from missing an include or a lib or something.

Lib:
\Bullet\bullet-2.50b\lib (i moved all the compiled libs into this directory)

Am i missing something completely obvious?
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA

Re: Demo won't compile - help!

Post by Erwin Coumans »

Please stick with latest version of Bullet, 2.63.

You should not modify any of the settings in the projectfiles to compile the Bullet demos, this solution file compiles all demos out-of-the-box, use this solution file:
Bullet/msvc/8/wksbullet.sln (for visual studio 2005).
So don't move libs, don't change include folders, just open the unmodified wksbullet.sln, hit F5 and it should be fine.

If you want to fix your first reported compile problem with the IrrlichtBullet demo, using Bullet 2.63, please follow my last advice, modify the construction like this.

Code: Select all

        btDefaultCollisionConfiguration* collisionConfiguration = new btDefaultCollisionConfiguration();
        btCollisionDispatcher* dispatcher = new btCollisionDispatcher(collisionConfiguration);
        btVector3 worldMin(-1000,-1000,-1000);
        btVector3 worldMax(1000,1000,1000);
        btBroadphaseInterface* pairCache = new btAxisSweep3(worldMin,worldMax);
        btConstraintSolver* constraintSolver = new btSequentialImpulseConstraintSolver();
        m_dynamicsWorld = new btDiscreteDynamicsWorld(dispatcher,pairCache,constraintSolver,collisionConfiguration);
Please let us know if this helps,
Erwin
nano
Posts: 6
Joined: Sun Oct 28, 2007 2:45 am

Re: Demo won't compile - help!

Post by nano »

Sorry, when i said compiling i didn't mean that i couldn't get the exe's created from the solution file. The solution works just fine in creating all the libs and exes, i was trying to compile the VehicleDemo from the source (the cpp and h provided) to make sure my VC++ was set up to allow me to work with Bullet.

To do that it helps to specify to VC++ where the directories of include files and lib files are so that you don't have to add the files to every project you do.

I was just trying to set it up so i can actually use Bullet in my own projects and was using the VehicleDemo source to test my settings.

Edit: I finally got the Irrlicht demo to compile with 2.63! Thanks for the help.

I needed to include the release/libs directory as well as C:\Irrlicht\Bullet\bullet-2.63final\src, i'm not sure why i ended up including other directories last time.

I had to alter the code as you'd said Erwin, but you had:

Code: Select all

m_dynamicsWorld = new btDiscreteDynamicsWorld(dispatcher,pairCache,constraintSolver,collisionConfiguration);
btDiscreteDynamicsWorld doesn't have any constructors that take four arguments, specifically it doesn't take a collisionConfiguration as an argument. I got the code working when i changed that to:

Code: Select all

m_dynamicsWorld = new btDiscreteDynamicsWorld(dispatcher,pairCache,constraintSolver);
The Irrlicht demo now compiles with version 1.3.1 of Irrlicht and 2.63 of Bullet. I'll upload it incase anyone needs it in the future.

Edit2: Also worth noting is that there used to be a considerable slowdown and general bad handling of the added 'compound of 2 small spheres' where the frame rate would drop drastically and/or the shapes would not collide with anything and fall through the world, but with the 1.31 Irrlicht/2.63 Bullet version there is no noticable framerate change and the objects collide as they should (although drop enough and you will see some odd results with them clinging to the chair object'.

File is here