First, in Dev-CPP, open Tools->Check for Updates/Packages and download the DirectX 9 Devpak (this contains what you need for DX8 as well).
Then, unzip the Irrlicht sources and open the Irrlicht.dev project file.
Go to Project->Project Options (ALT+P) and go to the parameters tab, and add this line:
-D_IRR_COMPILE_WITH_DIRECTX_8_=1
to Compiler and C++ compiler options, under -DIRRLICHT_EXPORTS=1 (maybe only C++ is needed, but it doesn't hurt). This tells Irrlicht to build the driver for Direct X 8.
Then, add this line to the linker options:
-ld3dx8d
This tells the linker to include the Direct X library into the DLL.
Then, go to the Directories tab, and change the library directories to:
jpeglib
zlib
- Those are local paths to the libs included in the source zip.
Change the include directory to simply:
include
- also the local path.
Now, all you should need to do is hit CTRL+F9 and go get some coffee while it builds. You will need to copy the d3dx8d.dll file to either the system dir or to the dir you are executing your programs in... I'm not sure if it is possible to build this statically, but this will have to do for now - at least we have DX support, as all the examples run just fine.
Now, doing this sadly means that you need the Direct X DLL no matter what driver you are building for - I was planning to include this DLL in the DevPak instead, but now I'm not so sure. Maybe I should just supply both or something, I'll have to think about it.
I couldn't get the same procedure to work for DirectX 9 no matter what I tried - it builds and links alright, but it looks for the wrong DLL (d3d9.dll I think) that I don't have. Anybody has any clues? I've only downloaded and used the DX9 DevPak, no other SDK:s or anything.