Secondly, because there is no "makefileList" in the folder, so It is not possible to create VC8 project by using CMake. An alternative way is to create a emplty project in VC8 and add the projects (OgreBulletCollisions and OgreBulletDynamics).
Comple them, and libs are obtained!
(Notes: link errors appear when compile "Dynamics_Demos", I tried patches for OgreBullet from
http://sourceforge.net/tracker/?group_id=225283&atid=1064241)
Next step is to use Ogre VC8 AppWizard to set up Ogre wrapper application.
see http://www.ogre3d.org/tikiwiki/OgreBullet+Tutorial+1&structure=Libraries
(continuing......)
Here we go..................
Preparation
- unpack Bullet and fetch OgreBullet to a place in the hard drive
- set an environment variable:
- set an environment variable:
BULLET_HOME C:\OgreSDK\AddOns\bullet-2.76 (if this is were you unpacked Bullet)
You can find the place in Windows XP following this path: open Control Panel (classic view) / System / Advanced / Environment Variables. Set it in the User Variables box.
- build Bullet in your IDE (I done it in VS2008 Express)__
''The project file for VS 2008 is here: ....\bullet-2.76\msvc\2008\BULLET_PHYSICS.sln
Build it in debug and release mode. It should compile without any problem.''
Build it in debug and release mode. It should compile without any problem.''
- build OgreBullet also: ....\OgreBullet\OgreBullet_SDK.sln
VS2008 converted the project without any errors for me.
When you build the debug version of the demos you may have some errors about missing .lib files.
Put these files to ....\OgreBullet\lib\Debug\:
BulletCollision.lib, can be found here: ....\bullet-2.76\msvc\2008\src\BulletCollision\Debug\
BulletDynamics.lib, can be found here: ....\bullet-2.76\msvc\2008\src\BulletDynamics\Debug\
ConvexDecomposition.lib, can be found here: ....\bullet-2.76\msvc\2008\Extras\ConvexDecomposition\Debug\
GIMPACTUtils.lib, can be found here: ....\bullet-2.76\msvc\2008\Extras\GIMPACTUtils\Debug\
LinearMath.lib, can be found here: ....\bullet-2.76\msvc\2008\src\LinearMath\Debug\
BulletCollision.lib, can be found here: ....\bullet-2.76\msvc\2008\src\BulletCollision\Debug\
BulletDynamics.lib, can be found here: ....\bullet-2.76\msvc\2008\src\BulletDynamics\Debug\
ConvexDecomposition.lib, can be found here: ....\bullet-2.76\msvc\2008\Extras\ConvexDecomposition\Debug\
GIMPACTUtils.lib, can be found here: ....\bullet-2.76\msvc\2008\Extras\GIMPACTUtils\Debug\
LinearMath.lib, can be found here: ....\bullet-2.76\msvc\2008\src\LinearMath\Debug\
There are some files what we don't need now but you may need later. For example BulletSoftBody.lib. If something is missing when you use more components from Bullet, don't forget to copy it to the right place.
NOTE: If you want to Compile/Run the OgreBullet demos supplied with OgreBullet and it can't find resources.cfg don't wonder. This tutorial is not about these demos but I think you can solve it yourself. There are some problems with paths 

If you want to build the release version of the demos (or any OgreBullet project!) you have to put the Bullet .lib files to the ....\OgreBullet\lib\Release folder.
But beware! You have to put the RELEASE version of Bullet .lib files to this dir, not the same files what were listed before.
But beware! You have to put the RELEASE version of Bullet .lib files to this dir, not the same files what were listed before.
Now we have the required files, let's close this project and start a new!
Create an empty project with Bullet support
If you have Ogre Appwizard installed, create a new Ogre project:
New project -->“ Ogre SDK Application -->“ OgreBullet_Collision_test -->“ Finish
I refer to the classes with the names what are generated from the project name. If you want to use another name, be careful with the different names.
(If you don't have Appwizard just create a basic Ogre application what is able to create a window,
fire up a FrameListener and care for keyboard/mouse input handle.)
From now on I refer to Appwizard basic project.
Before we start coding (in the next tutorial) we need to do some configuration:
- Open Project\Properties (Alt+F7)
- Go to Configuration Properties\C/C++\General
- Find Additional Include Directories, open with '...' button
- Put $(BULLET_HOME)\src to the end of the list.
- Change the Configuration (in the top-left corner of the window) to Release and do the same.
- Go to Configuration Properties\C/C++\General
- Find Additional Include Directories, open with '...' button
- Put $(BULLET_HOME)\src to the end of the list.
- Change the Configuration (in the top-left corner of the window) to Release and do the same.
- Now go to Configuration Properties\Linker\Input
- Find Additional Dependencies
- Add required elements. In the end it should contain these:
- OgreMain_d.lib
- OIS_d.lib
- OgreBulletCollisions_d.lib
- OgreBulletDynamics_d.lib
- bulletcollision.lib
- bulletdynamics.lib
- LinearMath.lib
- GIMPACTutils.lib
- ConvexDecomposition.lib
- Change the Configuration (in the top-left corner of the window) to Release and insert these to the same place as before:
- OgreMain.lib OIS.lib
- OgreBulletCollisions.lib
- OgreBulletDynamics.lib
- bulletcollision.lib
- bulletdynamics.lib
- LinearMath.lib
- GIMPACTutils.lib
- ConvexDecomposition.lib
- Now close this window and go to Tools\Options\Projects and Solutions\VC++ Directories\
- Set Show directories for: Include files
- Put these into the list (your path to OgreBullet needed):
....\OgreBullet\Collisions\include
....\OgreBullet\Dynamics\include
- Change to Library files and put these to the list:
....\OgreBullet\lib\Debug
....\OgreBullet\lib\Release
Build the project. It should be working. Now you can start the next tutorial what is based on this project 

NOTE: source code can be found at the end of the second tutorial.
Aucun commentaire:
Enregistrer un commentaire