Tuesday, September 29, 2009

Configure and Build Havok Demos on Visual Studio 2008 and Windows 7 64bits

This post will try to explain step-by-step how to configure Visual Studio/Visual C++ and Windows 7 64bits to build Havok's Demo project. At time of post the following versions were used:
  • Visual Studio 2008
  • August 2009 DirectX SDK
  • Havok 6.5.0r1
  1. First lets download Visual C++ from Microsoft's web site and install it: Visual C++.
  2. Once we have that we need to install Microsoft's DirectX SDK so go ahead and download that: DirectX SDK.
  3. Once we have those we are ready to download Havok. Go to Havok's web site and submit the form to acess your download. 
  4. Unpack it. I recommend unpacking it to any subfolder under your user folder. This is because Visual C++ needs to write intermediate files after compiling and Windows 7 comes with folder acess rights restricted so if you unpack it under the file system folders you will have to set it so that Visual C++ can read/write on that. So go ahead and create a API folder inside Libraries -> Documents -> Visual Studio 2008.
  5. Open Visual C++ and open the Havok Demo Project (if you followed instructions should be at C:\Users\"UserName"\Documents\Visual Studio 2008\API\hk650r1\Demo\Demos\Demos_win32_9-0.vcproj
  6. Open project's properties (Project -> Properties (Atl-F7 by default)
  7. Click on Configuration Properties -> Linker -> General
  8. Inside the General tab select Addicional Library Dependencies and click on the button with "..." on the right end of the line to edit.
  9. Create a new line and browse to DirectX SDK dxguid.lib. If you installed it in it's default directory it should be in C:\Program Files (x86)\Microsoft DirectX SDK ( version ). The dxguid.lib is in Lib -> x86. Important: Even if you use 64bit system select the x86 folder. The dxguid.lib inside the x64 folder has givem me some incompatibility issues but the x86 works fine so far.
  10. Try to build/run your Demo, it should work fine.

No comments:

Post a Comment