Prior to beginning. Do note that melee.json, ranged.json, instruments.json, and recipes.json are accessible in cataclysm/data/raw folder. Once you compile the game, whatever is in the raw folder will be reloaded by the executable, meaning you will not have to fiddle with itemdefs if your stuff is in any of these four files. This is quite important as compiling takes a long time on older computers and makes the computer slow down to a crawl while it's at it.
To compile you need two things.
1. The code itself.
2. A program to run a special file in said code that instructs the program on how to compile the files.
After acquiring these two things,
3. You will need to compile it.
1a. The source code can be accessed from github. A link is available on the main page of the mode:
1b. Upon clicking theat link, you will be brought to this github page:
1c. Click the ZIP button in the red circle to commence a download of the code.
End of point 1. You more or less have the code.
2a. To download codeblocks, go to this site: http://www.codeblocks.org/downloads/26
2b. On that site, choose this installer:
2c. Install the program, let the default settings guide you.
End of point 2. The program is now fully operational.
Step 3 will compile the files. This means that if you want to make changes to the code or add stuff into it, you need to do it at this point, not after.
3a. The code is in the zipped format, IE. it is compressed into a single file to allow for easy downloading. You need to unzip it:
I have already extracted the file, the normal-looking file on top is the result of having extracted the file. The selected option in the right-clicked menu is the one you need to hit to get the normal-looking file.
3b. Go into the unzipped file and open this file:
3c. Upon clicking it, this screen will pop up.
3d. To compile, you need to right-click cataclysm on the left bar, and choose build.
When the program finishes, it will look like this:
Note, itemdefs will take a loooooooooooooong time to get through. As you can see (or maybe not depending on the resize), it takes me 35 minutes alone to compile it. Yours should be faster if you are not using a 5 year old unmodified laptop.
To play your modified game, you need to find the folder where the Code::Blocks file was and the executable should be in there.