
This thread helped me with some things: http://www.slembcke.net/forums/viewtopic.php?f=1&t=250 Thanks!
Hope it helps! And let me know if something is better done another way or if something isn't clear. I might include images and format it better if demanded.
CREATING THE CHIPMUNK DEMO PROJECT IN CODE::BLOCKS
========================================================
DOWNLOAD AND INSTALL PREREQUISITES (If you haven't already)
Install Codeblocks and GLUT for this to work.
1. Install Code::Blocks if you haven't done so. For windows get it here: http://www.codeblocks.org/downloads/binaries
2. Make sure you get the version with MinGW included so you have a GCC compiler.
3. Start the installer and follow the instructions
4. Make sure glut.h and glut32.lib are in codeblocks MinGW/include and lib folders or elsewhere they can be found.
CREATING THE PROJECT
1. When Codeblocks is started, create a new project as a GLUT project. File->New->Project..
2. Choose GLUT Project. Click the Go-button.
3. In the wizard. Click next (check the box if you don't want to see that screen anymore).
4. Name your project, specify where to install and hit next again.
5. Point out where you have your glut files (include and lib containing glut.h and glut32.lib respectively). Click next.
6. Here the GCC compiler should already be selected in the drop-down list if you downloaded the right codeblocksversion. Just click Finish.
7. A default main.cpp was created when the project was created. go ahead and remove it by right-clicking on it and choose "remove file from project". We'll use the main.c as starting point in the chipmunk source later.
GETTING THE CHIPMUNK SOURCE FILES
I got the source from the SVN repository like this:
1. Download and install TortoiseSVN. http://tortoisesvn.tigris.org/
2. Create an empty folder somewhere to put the chipmunk files. Open the folder and right-click and choose SVN Checkout...
3. enter http://chipmunk-physics.googlecode.com/svn/trunk/ as "URL of repository". More info: http://code.google.com/p/chipmunk-physi ... e/checkout
4. The folder you created should be preselected below. Click OK. All chipmunk files should be downloaded to your folder. Close the tortoisesvn windows.
ADDING THEM TO THE CODEBLOCKS PROJECT
1. Copy the Demo and src folders from the svn folder to your project folder.
2. In codeblocks, right-click your project in the Management listview to the left and choose "Add files recursively..."
3. Find your project folder and click OK.
4. A list of files to be included appears. Make sure ONLY .h and .c files are checked. Click OK
5. A new window appears. Click Select All so the source is included for both debug and release builds. Click OK.
CONFIGURING THE PROJECT
If you build now, chipmunk.h won't be found.
1. To correct this right-click your project again in the management view and this time choose Build options... NOTE: make SURE your project name is selected, not release or debug as you would have to place the following things in both configurations otherwise.
2. Click the "Search directories" tab and click Add. Find the chipmunk src folder and click OK.
If we build now, it will complain about a for-loop declaration outside C99 mode. To get around this:
3. Enter build options again and make sure the compiler settings tab is selected then choose the Other options tab. Enter "-std=c99" without quotes in the box here. Click OK.
If we build again it complains about M_PI not being defined.
4. Next we need 2 defines for a clean build. M_PI and GLUT_BUILDING_LIB (I got some missing GLUT undefined functions otherwise. there's probably a better way to do this..)
Either define them in main.c like so:
#define Enter M_PI=3.141592653589
#define GLUT_BUILDING_LIB
or enter build options yet again and under compiler settings click the #defines tab. add:
GLUT_BUILDING_LIB;M_PI=3.141592653589
BUILD AND RUN
Finally build the project and enjoy the demos!