EDIT: problems resolved! Thanks to Cobra & the irrlicht chat
I'll recap how it was solved in case someone else might encounter the same problems in the future:
This is how I got the Hello World example to work:
My first mistake was not installing Bullet itself (really stupid
) So do that first. I recommend you follow these steps:
First get the Hello World example of Bullet to work.
Then get this to work:
http://irrlicht.sourceforge.net/phpBB2/ ... 918#223918
Now you can try to get the Hello World example of irrBullet to work.
Then I made some mistakes by executing the steps in the readme file of irrBullet.
The readme file says:
2.1. Add these search directories to your project:
%irrBullet%/source
%irrBullet%/source/bheaders
%irrBullet%/source/bheaders/Bullet
In visual studio 2010 this is done by going to the property pages. Then expanding the C/C++ option in the menu and clicking the General option in the menu. The first parameter is Additional Include Directories. Click on the empty field and on the arrow that appears. Then click <edit>
Now you have the 3 folders mentioned above. They are found in the irrBullet folder.
That was pretty straightforward, but you need to do the exact same thing again, but now for the Release configuration. on the main screen of the project you see a green 'play' arrow you can click on to start debugging. Next to it is the word 'Debug', change that to Release and redo the above.
Step 2.2 was already done in the hello world example code
Last step:
Code: Select all
2.3. add these files to your linker (available in the libs/ folder):
libirrBullet.a, libbulletdynamics.a, libbulletsoftbody.a
libGIMPACTUtils.a (if you use GImpact),
liblinearmath.a, libbulletcollision.a
Make sure the linker files are in that order for irrBullet
or your project will not compile.
These files can be found in the irrBullet-0.1.71\lib\win32_visualstudio\2008 folder
Include them by going to the property pages again, then under C/C++ go to Linker/Input you must include the lib files next to the Additional Dependencies by adding them like this: BulletSoftBody.lib;BulletDynamics.lib;BulletCollision.lib;LinearMath.lib;
You probably have to do this for both debug and release mode, but I did this entire step differently. I put the following in the main.cpp function of my project:
Code: Select all
#pragma comment(lib, "irrBullet.lib")
#pragma comment(lib, "BulletDynamics.lib")
#pragma comment(lib, "BulletSoftBody.lib")
#pragma comment(lib, "GIMPACTUtils.lib")
#pragma comment(lib, "BulletCollision.lib")
#pragma comment(lib, "LinearMath.lib")
#pragma comment(lib, "Irrlicht.lib")
And thats it, it works. I still have 41 warnings, but no errors and it runs perfectly fine
I got the Hello World example of Bullet working without a problem now. Only thing I added to it was this:
Code: Select all
#pragma comment(lib, "irrBullet.lib")
#pragma comment(lib, "BulletDynamics.lib")
#pragma comment(lib, "BulletSoftBody.lib")
#pragma comment(lib, "GIMPACTUtils.lib")
#pragma comment(lib, "BulletCollision.lib")
#pragma comment(lib, "LinearMath.lib")
(This is the same as adding the files to the linker, right?)
I don't seem to be able to get the irrBullet Hello world example to work though. I created a new project, made a main.cpp helloworldexample.cpp and helloworldexample.h file and copied the code from the examples to it. I also copied the exampleframework folder to my project folder and I added the following to the main.cpp file:
Code: Select all
#pragma comment(lib, "irrBullet.lib")
#pragma comment(lib, "BulletDynamics.lib")
#pragma comment(lib, "BulletSoftBody.lib")
#pragma comment(lib, "GIMPACTUtils.lib")
#pragma comment(lib, "BulletCollision.lib")
#pragma comment(lib, "LinearMath.lib")
#pragma comment(lib, "Irrlicht.lib")
Now I get 8 warnings and 19 errors:
full size image:
http://postimage.org/image/33p3hxrb8/full/
I have no idea what these errors mean, but it's probably because I did something wrong in step 2.1:
2.1. Add these search directories to your project:
%irrBullet%/source
%irrBullet%/source/bheaders
%irrBullet%/source/bheaders/Bullet
How should I do this step in visual studio 2010?
[/size]