Compile OgreBullet in Windows

DerReinhardt

28-10-2012 05:23:33

So, I am following the tutorial 1: http://www.ogre3d.org/tikiwiki/OgreBull ... torial%201. But I can't compile OgreBullet 2986 to get the .lib's (https://ogreaddons.svn.sourceforge.net/ ... grebullet/). I solved all the linker problems but I am getting errors with conversions from casts:

1>------ Build started: Project: OgreBulletCollisions, Configuration: Debug Win32 ------
2>------ Build started: Project: BulletCollision, Configuration: Debug Win32 ------
3>------ Build started: Project: BulletDynamics, Configuration: Debug Win32 ------
4>------ Build started: Project: LinearMath, Configuration: Debug Win32 ------
1> OgreBulletCollisionsWorld.cpp
1>..\..\src\OgreBulletCollisionsWorld.cpp(226): error C2440: 'static_cast' : cannot convert from 'const btCollisionObject *' to 'btCollisionObject *'
1> Conversion loses qualifiers
1>..\..\src\OgreBulletCollisionsWorld.cpp(227): error C2440: 'static_cast' : cannot convert from 'const btCollisionObject *' to 'btCollisionObject *'
1> Conversion loses qualifiers
1> OgreBulletCollisionsRay.cpp
1>..\..\src\OgreBulletCollisionsRay.cpp(87): error C2664: 'OgreBulletCollisions::Object *OgreBulletCollisions::CollisionsWorld::findObject(Ogre::SceneNode *) const' : cannot convert parameter 1 from 'const btCollisionObject *' to 'Ogre::SceneNode *'
1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
1> Generating Code...
4> Building Custom Rule C:/Users/Reinhardt/Downloads/bullet-2.76/bullet-2.76/src/LinearMath/CMakeLists.txt
2> Building Custom Rule C:/Users/Reinhardt/Downloads/bullet-2.76/bullet-2.76/src/BulletCollision/CMakeLists.txt
3> Building Custom Rule C:/Users/Reinhardt/Downloads/bullet-2.76/bullet-2.76/src/BulletDynamics/CMakeLists.txt
4> CMake does not need to re-run because C:\Users\Reinhardt\Dropbox\IIMAS\Tercer Semestre\Animacion por compu\Bullet Projects\Bullet276BuildCMakeFi\src\LinearMath\CMakeFiles\generate.stamp is up-to-date.
2> CMake does not need to re-run because C:\Users\Reinhardt\Dropbox\IIMAS\Tercer Semestre\Animacion por compu\Bullet Projects\Bullet276BuildCMakeFi\src\BulletCollision\CMakeFiles\generate.stamp is up-to-date.
3> CMake does not need to re-run because C:\Users\Reinhardt\Dropbox\IIMAS\Tercer Semestre\Animacion por compu\Bullet Projects\Bullet276BuildCMakeFi\src\BulletDynamics\CMakeFiles\generate.stamp is up-to-date.
4> btAlignedAllocator.cpp
3> btKinematicCharacterController.cpp
2> btAxisSweep3.cpp
5>------ Build started: Project: OgreBulletDynamics, Configuration: Debug Win32 ------
4> btConvexHull.cpp
4> btGeometryUtil.cpp
5> OgreBulletDynamicsWorld.cpp
5>..\..\src\OgreBulletDynamicsWorld.cpp(111): error C2440: 'static_cast' : cannot convert from 'const btCollisionObject *' to 'btCollisionObject *'
5> Conversion loses qualifiers
5>..\..\src\OgreBulletDynamicsWorld.cpp(112): error C2440: 'static_cast' : cannot convert from 'const btCollisionObject *' to 'btCollisionObject *'
5> Conversion loses qualifiers
2> btBroadphaseProxy.cpp
4> btQuickprof.cpp
3> btConeTwistConstraint.cpp
2> btCollisionAlgorithm.cpp
2> btDbvt.cpp
3> btContactConstraint.cpp
4> btSerializer.cpp
2> btDbvtBroadphase.cpp
4> Generating Code...
3> btGeneric6DofConstraint.cpp
2> btDispatcher.cpp
4> LinearMath.vcxproj -> C:\Users\Reinhardt\Dropbox\IIMAS\Tercer Semestre\Animacion por compu\Bullet Projects\Bullet276BuildCMakeFi\lib\Debug\LinearMath.lib
2> btMultiSapBroadphase.cpp
3> btGeneric6DofSpringConstraint.cpp
2> btOverlappingPairCache.cpp
3> btHinge2Constraint.cpp
2> btQuantizedBvh.cpp
3> btHingeConstraint.cpp
2> btSimpleBroadphase.cpp
3> btPoint2PointConstraint.cpp
2> btActivatingCollisionAlgorithm.cpp
3> btSequentialImpulseConstraintSolver.cpp
2> btBoxBoxCollisionAlgorithm.cpp
2> btBox2dBox2dCollisionAlgorithm.cpp
3> btSliderConstraint.cpp
2> btBoxBoxDetector.cpp
3> btSolve2LinearConstraint.cpp
2> btCollisionDispatcher.cpp
3> btTypedConstraint.cpp
2> btCollisionObject.cpp
3> btUniversalConstraint.cpp
2> btCollisionWorld.cpp
3> btContinuousDynamicsWorld.cpp
3> btDiscreteDynamicsWorld.cpp
2> btCompoundCollisionAlgorithm.cpp
2> btConvexConcaveCollisionAlgorithm.cpp
2> btConvexConvexAlgorithm.cpp
3> btRigidBody.cpp
2> Generating Code...
3> btSimpleDynamicsWorld.cpp
3> Bullet-C-API.cpp
2> Compiling...
2> btConvexPlaneCollisionAlgorithm.cpp
2> btConvex2dConvex2dAlgorithm.cpp
2> btDefaultCollisionConfiguration.cpp
3> btRaycastVehicle.cpp
2> btEmptyCollisionAlgorithm.cpp
3> btWheelInfo.cpp
2> btGhostObject.cpp
3> Generating Code...
2> btInternalEdgeUtility.cpp
2> btManifoldResult.cpp
2> btSimulationIslandManager.cpp
3> BulletDynamics.vcxproj -> C:\Users\Reinhardt\Dropbox\IIMAS\Tercer Semestre\Animacion por compu\Bullet Projects\Bullet276BuildCMakeFi\lib\Debug\BulletDynamics.lib
2> btSphereBoxCollisionAlgorithm.cpp
2> btSphereSphereCollisionAlgorithm.cpp
2> btSphereTriangleCollisionAlgorithm.cpp
2> btUnionFind.cpp
2> SphereTriangleDetector.cpp
2> btBoxShape.cpp
2> btBox2dShape.cpp
2> btBvhTriangleMeshShape.cpp
2> btCapsuleShape.cpp
2> btCollisionShape.cpp
2> btCompoundShape.cpp
2> btConcaveShape.cpp
2> Generating Code...
2> Compiling...
2> btConeShape.cpp
2> btConvexHullShape.cpp
2> btConvexInternalShape.cpp
2> btConvexPointCloudShape.cpp
2> btConvexShape.cpp
2> btConvex2dShape.cpp
2> btConvexTriangleMeshShape.cpp
2> btCylinderShape.cpp
2> btEmptyShape.cpp
2> btHeightfieldTerrainShape.cpp
2> btMinkowskiSumShape.cpp
2> btMultimaterialTriangleMeshShape.cpp
2> btMultiSphereShape.cpp
2> btOptimizedBvh.cpp
2> btPolyhedralConvexShape.cpp
2> btScaledBvhTriangleMeshShape.cpp
2> btShapeHull.cpp
2> btSphereShape.cpp
2> btStaticPlaneShape.cpp
2> btStridingMeshInterface.cpp
2> Generating Code...
2> Compiling...
2> btTetrahedronShape.cpp
2> btTriangleBuffer.cpp
2> btTriangleCallback.cpp
2> btTriangleIndexVertexArray.cpp
2> btTriangleIndexVertexMaterialArray.cpp
2> btTriangleMesh.cpp
2> btTriangleMeshShape.cpp
2> btUniformScalingShape.cpp
2> btContactProcessing.cpp
2> btGenericPoolAllocator.cpp
2> btGImpactBvh.cpp
2> btGImpactCollisionAlgorithm.cpp
2> btGImpactQuantizedBvh.cpp
2> btGImpactShape.cpp
2> btTriangleShapeEx.cpp
2> gim_box_set.cpp
2> gim_contact.cpp
2> gim_memory.cpp
2> gim_tri_collision.cpp
2> btContinuousConvexCollision.cpp
2> Generating Code...
2> Compiling...
2> btConvexCast.cpp
2> btGjkConvexCast.cpp
2> btGjkEpa2.cpp
2> btGjkEpaPenetrationDepthSolver.cpp
2> btGjkPairDetector.cpp
2> btMinkowskiPenetrationDepthSolver.cpp
2> btPersistentManifold.cpp
2> btRaycastCallback.cpp
2> btSubSimplexConvexCast.cpp
2> btVoronoiSimplexSolver.cpp
2> Generating Code...
2> BulletCollision.vcxproj -> C:\Users\Reinhardt\Dropbox\IIMAS\Tercer Semestre\Animacion por compu\Bullet Projects\Bullet276BuildCMakeFi\lib\Debug\BulletCollision.lib
6>------ Build started: Project: Dynamics_Demos, Configuration: Debug Win32 ------
6>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppBuild.targets(990,5): warning MSB8012: TargetPath(C:\ogre\OgreBullet\Demos\Dynamics_Demos\scripts\VC8\..\..\..\Dynamics_Demos.exe) does not match the Linker's OutputFile property value (C:\ogre\OgreBullet\Demos\OgreBulletDynamicsDemo_d.exe). This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Link.OutputFile).
6>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppBuild.targets(992,5): warning MSB8012: TargetName(Dynamics_Demos) does not match the Linker's OutputFile property value (OgreBulletDynamicsDemo_d). This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Link.OutputFile).
6>LINK : fatal error LNK1104: cannot open file 'OgreMain_d.lib'
========== Build: 3 succeeded, 3 failed, 0 up-to-date, 0 skipped ==========

I tried with bullet 2.76, 2.80-rev2531, and 2.81-rev2613.
OgreBullet 2986
VC++ Express 2010
Windows 7, 64-bit

Any help is appreciated.

Thanks in advance