On Friday 24 September 2010 18:25:47 Andy Elvey wrote: > Hi all - > I'm a first-timer here and very keen to get into some D coding! > Unfortunately, I have a problem. I've installed the "one-click" .deb > package from Digital Mars, but when I try to compile a very simple D > program, I get this message - > dmd -w -c "hello.d" (in directory: /home/andy/d_stuff) > Compilation failed. > object.d: Error: module object cannot read file 'object.d' > > So, does anyone know what is causing this, and how it can be fixed? > It looks like the compiler is unable to find something. > > Very many thanks in advance - bye for now - > - Andy
It sounds like your dmd.conf needs adjusting or like maybe you don't have on at all. It sets DFLAGS which tells the compiler where to find the source code for druntime and phobos as well as their libraries. The current default dmd.conf is [Environment] dflags=...@p%/../../src/phobos -...@p%/../../src/druntime/import -l...@p%/../lib -L--export-dynamic So, you either need to adjust the one that gets installed with the deb package or use your own in a place higher in the list of places to search for dmd.conf. Look here for the specifics: http://www.digitalmars.com/d/2.0/dmd- linux.html#dmd_conf . - Jonathan M Davis