Last Update 02-14-2014
My video tutorial series, "Using Old Source Code", shows you how to set up your IDE to compile and run the code from old programming books. I have looked for this information many times over the years. Nobody else provided it, to my knowledge, so I am.
For now this series is focused on Andre LaMothe's, "Tricks of the Windows Game Programming Gurus." I take you step by step through setting everything up CodeBlocks, Visual Studio Express C++ 2008 and Visual Studio Express C++ 2010. In the end we get the first game, Freakout, up and running, with only one change to two source code files, the removal of a .h. Nothing else is needed.
The operating system I am using is Windows XP SP3. The version of DirectX I am using is DirectX 9, the June 2010 release. While these instructions may have some value for Windows Vista - Windows 8 and Visual Studio Express C++ 2012 I can make no guarantees. However there should be no problem following along using Visual Studio Express C++ 2005. Additionally what I teach here should apply to DirectX setup for any other IDE at least in general, although the user should know their compiler well enough to adapt everything as needed.
Later I will probably work on Michal Dawson's, "Beginning 3D Game Programming in C++" and then perhaps Hawkins and Astle's, "OpenGL Game Programming." After that, once my programming and math skills are sufficient, I will turn to Vaughan Young's "Programming a Multiplayer FPS in DirectX" and Greg Snook's, "Real-Time 3D Terrain Engines using C++ and DirectX9." I have all these old programming books, and I intend to get the code running from all of them.
My purpose here is simple. To teach programmers to become intimately familiar with their compilers so they can use any book, no matter how old, and if the code is even remotely usable, figure out how to get it to compile and run. They should also be able to do this on any computer that can run Windows XP as there are no special hardware requirements like Pixel Shader 2.0 for XNA 3.1.
For those who want to learn to program with a focus on games they should, through this ongoing series, find plenty of books they can now use. It is my hope that one of them will take all they have learned and create a comprehensive course in programming with an emphasis on the fun stuff - games. I would like to see the old teaching paradigm for programming fade away like the horrible nightmare it is.
I have updated this again, removing the WindowsSDK files from the main include and lib directories. It just seems to be screwing everything up, so now it is in its own directory and you can add the files you need. I built up everything from DirectX 2005-2014 and OpenGL 1998-2014. I have combined only the 32-bit versions of DirectX and OpenGL into the include and lib directories.
As of right now, if you are using Code::Blocks MinGW version, I advise that you copy the .dll files into CodeBlocks/MinGW/bin. You may also copy the include files into CodeBlocks/MinGW/include, but be sure to move the gl files into CodeBlocks/MinGW/include/GL after doing so. Those files are:
I have tested this and found it to work for "OpenGL Game Programming" and "Tricks of the Windows Game Programming Gurus." The latest video in the "Using Old Source Code Series", number 11 as of this writing, covers this. The next step is to get it working with "3D Game Programming with DirectX 9" and "Create A Multiplayer FPS in DirectX."
My whole goal here is to make it so any proper C++ code, no matter how archaic the libraries it used may be, can be compiled and run with little if any alteration. Sure, GLaux.gl is an archaic way of working with textures in OpenGL. Certainly the code that uses this should be updated with a better and more current library.
But if you are just starting out in programming, and trying to work your way through a book, you do not have the experience and knowledge you need to make those alterations. Which can cause a lot of frustration, especially if you paid a good $30-$50 or so for one of these books and just want to work through it. Your focus should be on learning how to program, not fixing archaic code! So that is why AllCode exists.
If anyone out there understands what I am trying to do here and is willing to help in any way, please contact me! All feedback, especially the constructive and helpful kind, is welcome!
Msvcr70 (for Windows 7)
Visual Studio Express
For .net 3.5
For .net 4