"I didn't attend the funeral, but I sent a nice letter saying I approved of it."
2009-12-07
I'm a big fan of this free DX managed wrapped called SlimDX. I used to use Managed DX but MS abandoned that which meant I was limited to DirectX version 9. SlimDX makes it possible to still use C# but also to have access to the latest DX10 and DX11 classes. The official releases of SlimDX are good but the SVN repository has the very latest changes to it. That just gives you access to the source, you still have to build your own dll to include in your SlimDX projects. I figured that some people may have trouble with this so I thought I'd write this simple guide.
...
Prequisites
Now it's time to actually build your new DLL. Why isn't this just a case of opening the sln file and hitting build? Well it seems SlimDX uses a few config options that don't carry across to the Express IDE. We need to go through and change these plus there are a couple of prequisite steps we need to take to get all the files we need ready to build SlimDX.
In the latest (August 2009) DX SDK they moved some of the effect source code into its own directory. You need to first build that project go get yourself a "d3dx11effects.lib" file.
C:\Program Files (x86)\Microsoft DirectX SDK (August 2009)\Utilities\Source\Effects11Building SlimDX
$(ProjectDir)..\external\Boost\$(DXSDK_DIR)\Utilities\Source\Effects11\IncC:\Program Files (x86)\Microsoft DirectX SDK (August 2009)\Utilities\Source\Effects11\Inc"$(SolutionDir)..\external\Effects11\x86"C:\Program Files (x86)\Microsoft DirectX SDK (August 2009)\Utilities\Source\Effects11\ReleaseNote about the file paths
I use Vista x64 so I have both a C:\Program Files (x86) and a C:\Program Files directory. On a x32 system you would only have the latter. Some of the include paths use a DXSDK_DIR variable, that doesn't get automatically created for the Express IDE when you install the DX SDK which is why I change it to use a hard coded path.
What about the included D3DX11Effects.lib file?
The SlimDX folks included this in the external\Effects11\x86 directory but there isn't any debug information and you'll get a bunch of warnings about that during the compilation process. That's why we compile our own version instead as the debug files get included with that version.