Because it took me 3 hours to find out... I made this Tutorial!
1.Get Chipmunk and glext.h
- Download Chipmunk Physics here: http://files.slembcke.net/chipmunk/rele ... Latest.tgz
- Extract the File (with WinRar for example)
- In the extracted Folder go to:
"<extracted Folder>/Chipmunk-X.X.X/MSVCSolution/"
- Download this file: (it is needed for the demos): http://www.opengl.org/registry/api/glext.h (right click/save as)
- Put it into "<extracted Folder>/Chipmunk-X.X.X/MSVCSolution/"
2. Compile Chipmunk
- Go into "<extracted Folder>/Chipmunk-X.X.X/MSVCSolution/"
- Open "Chipmunk4MSVC2k3.sln"
- Now VC++ will ask you if you want to convert the solution
- Click "Next"
- Click "Next" again
- Click "Finish"
- Uncheck "Show the conversion log..."
- Click Close
- Open main.c
- Edit two lines as shown in the image:
- Now press F5, now everything should compile fine. (If not tell me!)
- Now the Chipmunk Demo Application should start. Close it (or, first play around a bit and be impressed).
- You successfully built Chipmunk!
3. Use it in your own Project
- Open your project in VC++
- to your main application file (normally <project name>.cpp), add:
Code: Select all
#include "chipmunk.h"
- in the Options Window go to "Projects and solutions/VC++ Directories"
- select "Include Files"
- add a directory
- enter: "<extracted Folder>/Chipmunk-X.X.X/src"
- do the same as above, first select "Library Files"
- add a directory
- enter: "<extracted Folder>/Chipmunk-X.X.X/MSVCSolution/Chipmunk4MSVC2k3/Release"
- now right-click your project in the Solution Explorer and click on "Properties"
- In the Properties Window go to "Linker/Input"
- Add additional Dependencies:
- Enter the Following lines:
Code: Select all
chipmunk.obj
cpArbiter.obj
cpArray.obj
cpBB.obj
cpBody.obj
cpCollision.obj
cpHashSet.obj
cpJoint.obj
cpPolyShape.obj
cpShape.obj
cpSpace.obj
cpSpaceHash.obj
cpVect.obj
- Press "OK"
- Press "OK" again
- Press F5
- Your application should now compile fine and you can use Chipmunk like you want.
(see Documentation)
I hope everything worked well, and you can enjoy now the Chipmunk Physics Engine.
Anselm
If anything doesn't work please tell me!