This method assumes you will be using the Scons build system to compile Blender. It therefore does not cover using the toolkit with cygwin/make or the VC project files.
Please note, the toolkit requires Windows 2k, XP or later.
This page also assumes that you have checked out the current CVS sourcecode modules blender and lib/windows to the same directory. (also the quicktime libs if you want to have qt support)
| Step 1 | If you do not already have the .NET Framework SDK, download and install this first. You can get it here. |
| Step 2 | You will also need the Platform SDK to provide the Win32 API libraries. By default, this installs to C:\Program Files\Microsoft SDK. Make sure you select 'Register Environment Variables', as this will save you some work later. |
| Step 3 | Download and install the VC Toolkit from http://msdn.microsoft.com/visualc/vctoolkit2003. This will install the optimising compiler in C:\Program Files\Microsoft Visual C++ Toolkit 2003\bin. |
| Step 4 | You will need to have DirecX SDK installed if you wish to compile blender with OpenAL sound. You can get that here (218mb) You will Need to add it's Lib and Include paths to your appropriate environment variables. |
| Step 5 | Modify the file 'sdkvars.bat' (found in the .NET Framework SDK install dir) by adding the paths to VC Toolkit 2003 for each item (INCLUDE, LIB, etc). Ensure that these directories are listed first! |
So far so good, but here's where it gets a little tricky...
Scons looks for the file 'lib.exe', which is not distributed in any of the
above downloads.
Essentially, lib.exe calls 'link.exe /lib' so, it is possible to
create a substitute lib.exe...
| Step 6 | On this page (external link), you will find the source for an alternate lib.exe. Compile with the following: 'cl lib.c', and place the resulting lib.exe somewhere in your %PATH%, preferably in C:\Program Files\Microsoft Visual C++ Toolkit 2003\bin. |
| Step 7 | The Platform SDK does not include the following libraries: odbc32.lib and odbccp32. You will therefore need to remove these from your Config.opts (blender doesn't need them anyway). |
Make sure your path also includes the folder containing rc.exe. Do a search for rc.exe and make sure that you include it. If your platform toolkit does not include rc.exe , do not despair, I've found an excellent replacement for that on www.godevtool.com Get the resource compiler ( www.jorgon.freeserve.co.uk/Gorcjorg.zip ), unzip it, rename gorc.exe to rc.exe and copy it to somewhere in your path. Tadaaa.
To complete this, edit source/icons/winblender.rc so that the resources also contain the path source/icons, so winblender.ico becomes source/icons/winblender.ico, etc.
At this point, you are ready to compile!
If you have any questions that aren't answered here (very likely!), feel free to drop in at #blendercoders @ irc.freenode.net.
http://www.winprog.org/tutorial/msvc.html
http://sapdb.2scale.net/maxdb-wiki/MS_C++_Toolkit