It's relatively simple to set up Code::Blocks to compile D 1.0 programs, but I'm having a lot of trouble with D 2.0.
I went through all the paths in the compiler settings for the Digital Mars D compiler, changing the paths from "dmd" to "dmd2." However, when I try to compile a simple "Hello, world!" program I get an error message saying the object file could not be read. (It's not particularly helpful.)
Here's the full error:
Compiling: hello.d
object.d: Error: module object is in file 'object.d' which cannot be read
import path[0] = C:\Compilers\dmd2\src\phobos
import path[1] = C:\Compilers\dmd2\bin\..\..\src\phobos
import path[2] = C:\Compilers\dmd2\bin\..\..\src\druntime\import
I downloaded the latest nightly build and enabled full compiler logging.
dmd.exe -g -debug -IC:\Compilers\dmd2\src\phobos -c hello.d -ofobj\Debug\hello.obj
object.d: Error: module object is in file 'object.d' which cannot be read
import path[0] = C:\Compilers\dmd2\src\phobos
import path[1] = C:\Compilers\dmd2\bin\..\..\src\phobos
import path[2] = C:\Compilers\dmd2\bin\..\..\src\druntime\import
This is, of course, after a full cleaning.