iyasu
25-11-2007 22:19:53
Hi all,
I succeeded compiling OgreBullet by using the zip file provided at http://www.ogre3d.org/phpBB2addons/viewtopic.php?t=4840 but updated both ogre bullet and bullet contents to the latest versions.
With this, the demos are running fine. Now I am trying to integrate with my code.
For my project, I am using NetBeans. I have set up a directory outside my project that contain the contents mentioned above (bullet + ogre bullet).
I have added to include:
- ogre bullet include dir (from Collisions and Dynamic directories)
- bullet src dir (i suppose this is the one to add)
And I have linked the 3 bullet and 2 ogre bullet .a files, which I have copied to a directory inside my project.
Now I am getting undefined references when trying to instantiate a DynamicsWorld, such as:
This whole library linkage in C++ is a bit new to me (Java guy here). Can anyone point to what I am doing wrong? (either include missing, library missing)
Thanks in advance.
I succeeded compiling OgreBullet by using the zip file provided at http://www.ogre3d.org/phpBB2addons/viewtopic.php?t=4840 but updated both ogre bullet and bullet contents to the latest versions.
With this, the demos are running fine. Now I am trying to integrate with my code.
For my project, I am using NetBeans. I have set up a directory outside my project that contain the contents mentioned above (bullet + ogre bullet).
I have added to include:
- ogre bullet include dir (from Collisions and Dynamic directories)
- bullet src dir (i suppose this is the one to add)
And I have linked the 3 bullet and 2 ogre bullet .a files, which I have copied to a directory inside my project.
Now I am getting undefined references when trying to instantiate a DynamicsWorld, such as:
g++ -c -g -I/usr/local/include/OGRE -I/usr/local/include/CEGUI -I/usr/local/include/OIS -I/usr/local/include -I/opt/programming/ogre/ogrebullet/Collisions/include -I/opt/programming/ogre/ogrebullet/Dynamics/include -I/opt/programming/ogre/ogrebullet/bullet/src -I/opt/programming/ogre/ogrebullet/Collisions/include/Debug -o build/Debug/GNU-Linux-x86/components/listeners/PhysicsListener.o components/listeners/PhysicsListener.cc
In file included from /opt/programming/ogre/ogrebullet/bullet/src/BulletCollision/BroadphaseCollision/btAxisSweep3.h:27,
from /opt/programming/ogre/ogrebullet/bullet/src/btBulletCollisionCommon.h:52,
from /opt/programming/ogre/ogrebullet/Collisions/include/OgreBulletCollisionsPreRequisites.h:30,
from /opt/programming/ogre/ogrebullet/Collisions/include/OgreBulletCollisions.h:30,
from components/listeners/PhysicsListener.h:15,
from components/listeners/PhysicsListener.cc:2:
/opt/programming/ogre/ogrebullet/bullet/src/BulletCollision/BroadphaseCollision/btOverlappingPairCallback.h:37:37: warning: no newline at end of file
In file included from /opt/programming/ogre/ogrebullet/Dynamics/include/OgreBulletDynamics.h:30,
from components/listeners/PhysicsListener.h:16,
from components/listeners/PhysicsListener.cc:2:
/opt/programming/ogre/ogrebullet/Dynamics/include/OgreBulletDynamicsPreRequisites.h:56:45: warning: no newline at end of file
In file included from /opt/programming/ogre/ogrebullet/Dynamics/include/OgreBulletDynamicsRigidBody.h:34,
from components/listeners/PhysicsListener.cc:30:
/opt/programming/ogre/ogrebullet/Collisions/include/Utils/OgreBulletConverter.h:71:49: warning: no newline at end of file
In file included from /opt/programming/ogre/ogrebullet/Dynamics/include/Constraints/OgreBulletDynamicsRaycastVehicle.h:29,
from /opt/programming/ogre/ogrebullet/Dynamics/include/OgreBulletDynamicsRigidBody.h:38,
from components/listeners/PhysicsListener.cc:30:
/opt/programming/ogre/ogrebullet/Dynamics/include/OgreBulletDynamicsPreRequisites.h:56:45: warning: no newline at end of file
mkdir -p dist/Debug/GNU-Linux-x86
g++ -o dist/Debug/GNU-Linux-x86/albivene build/Debug/GNU-Linux-x86/Main.o build/Debug/GNU-Linux-x86/components/LocationComponent.o build/Debug/GNU-Linux-x86/components/listeners/VisualListener.o build/Debug/GNU-Linux-x86/components/GameComponent.o build/Debug/GNU-Linux-x86/GameObject.o build/Debug/GNU-Linux-x86/GameApplication.o build/Debug/GNU-Linux-x86/ObjectFactory.o build/Debug/GNU-Linux-x86/components/listeners/ComponentListener.o build/Debug/GNU-Linux-x86/components/listeners/LocationListener.o build/Debug/GNU-Linux-x86/components/VisualComponent.o build/Debug/GNU-Linux-x86/components/listeners/PhysicsListener.o build/Debug/GNU-Linux-x86/components/PhysicsComponents.o build/Debug/GNU-Linux-x86/ObjectTemplate.o build/Debug/GNU-Linux-x86/GameListener.o -L/usr/local/lib -Llib -lOgreMain -lOIS -lCEGUIBase -lCEGUIOgreRenderer -lLibBulletCollision -lLibBulletDynamics -lLibLinearMath -lOgreBulletCollisions -lOgreBulletDynamics
lib/libOgreBulletDynamics.a(OgreBulletDynamicsWorld.o): In function `OgreBulletDynamics::DynamicsWorld::stepSimulation(float, int)':
OgreBulletDynamicsWorld.cpp:(.text+0x391): undefined reference to `OgreBulletCollisions::DebugLines::clear()'
OgreBulletDynamicsWorld.cpp:(.text+0x3ed): undefined reference to `OgreBulletCollisions::DebugLines::draw()'
lib/libOgreBulletDynamics.a(OgreBulletDynamicsWorld.o): In function `OgreBulletDynamics::DynamicsWorld::~DynamicsWorld()':
OgreBulletDynamicsWorld.cpp:(.text+0x4db): undefined reference to `OgreBulletCollisions::CollisionsWorld::~CollisionsWorld()'
OgreBulletDynamicsWorld.cpp:(.text+0x515): undefined reference to `OgreBulletCollisions::CollisionsWorld::~CollisionsWorld()'
lib/libOgreBulletDynamics.a(OgreBulletDynamicsWorld.o): In function `OgreBulletDynamics::DynamicsWorld::~DynamicsWorld()':
OgreBulletDynamicsWorld.cpp:(.text+0x5af): undefined reference to `OgreBulletCollisions::CollisionsWorld::~CollisionsWorld()'
OgreBulletDynamicsWorld.cpp:(.text+0x5e9): undefined reference to `OgreBulletCollisions::CollisionsWorld::~CollisionsWorld()'
lib/libOgreBulletDynamics.a(OgreBulletDynamicsWorld.o): In function `OgreBulletDynamics::DynamicsWorld::~DynamicsWorld()':
OgreBulletDynamicsWorld.cpp:(.text+0x683): undefined reference to `OgreBulletCollisions::CollisionsWorld::~CollisionsWorld()'
lib/libOgreBulletDynamics.a(OgreBulletDynamicsWorld.o):OgreBulletDynamicsWorld.cpp:(.text+0x6bd): more undefined references to `OgreBulletCollisions::CollisionsWorld::~CollisionsWorld()' follow
lib/libOgreBulletDynamics.a(OgreBulletDynamicsWorld.o): In function `OgreBulletDynamics::DynamicsWorld::DynamicsWorld(Ogre::SceneManager*, Ogre::AxisAlignedBox const&, Ogre::Vector3 const&)':
OgreBulletDynamicsWorld.cpp:(.text+0x713): undefined reference to `OgreBulletCollisions::CollisionsWorld::CollisionsWorld(Ogre::SceneManager*, Ogre::AxisAlignedBox const&, bool)'
OgreBulletDynamicsWorld.cpp:(.text+0x78f): undefined reference to `btSequentialImpulseConstraintSolver::btSequentialImpulseConstraintSolver()'
OgreBulletDynamicsWorld.cpp:(.text+0x808): undefined reference to `btDiscreteDynamicsWorld::btDiscreteDynamicsWorld(btDispatcher*, btBroadphaseInterface*, btConstraintSolver*, btCollisionConfiguration*)'
OgreBulletDynamicsWorld.cpp:(.text+0x896): undefined reference to `OgreBulletCollisions::CollisionsWorld::~CollisionsWorld()'
lib/libOgreBulletDynamics.a(OgreBulletDynamicsWorld.o): In function `OgreBulletDynamics::DynamicsWorld::DynamicsWorld(Ogre::SceneManager*, Ogre::AxisAlignedBox const&, Ogre::Vector3 const&)':
OgreBulletDynamicsWorld.cpp:(.text+0x8d9): undefined reference to `OgreBulletCollisions::CollisionsWorld::CollisionsWorld(Ogre::SceneManager*, Ogre::AxisAlignedBox const&, bool)'
OgreBulletDynamicsWorld.cpp:(.text+0x955): undefined reference to `btSequentialImpulseConstraintSolver::btSequentialImpulseConstraintSolver()'
OgreBulletDynamicsWorld.cpp:(.text+0x9ce): undefined reference to `btDiscreteDynamicsWorld::btDiscreteDynamicsWorld(btDispatcher*, btBroadphaseInterface*, btConstraintSolver*, btCollisionConfiguration*)'
OgreBulletDynamicsWorld.cpp:(.text+0xa5c): undefined reference to `OgreBulletCollisions::CollisionsWorld::~CollisionsWorld()'
lib/libOgreBulletDynamics.a(OgreBulletDynamicsWorld.o):(.rodata._ZTIN18OgreBulletDynamics13DynamicsWorldE[typeinfo for OgreBulletDynamics::DynamicsWorld]+0x10): undefined reference to `typeinfo for OgreBulletCollisions::CollisionsWorld'
collect2: ld returned 1 exit status
This whole library linkage in C++ is a bit new to me (Java guy here). Can anyone point to what I am doing wrong? (either include missing, library missing)
Thanks in advance.