object.d: Error: module object is in file 'object.d' which cannot be read

Brian Brady brian.brady1982 at gmail.com
Wed Aug 24 00:57:07 PDT 2011


All

I am having a problem compiling a simple program when working through "The D
Programming Language". The program is like so:

#!/usr/bin/rdmd

import std.stdio, std.string;

void main()
{
  //Compute counts
  uint[string] freqs;
  foreach(line; stdin.byLine())
  {
    foreach(word; split(strip(line)))
    {
      ++freqs[word.idup];
    }
  }

  //Prints count
  foreach(key, value; freqs)
  {
    writefln("%6u\t%s", value, key);
  }
}

but this is the error I get when running it.

brian at brians-tower:~/Programming/D$ ./readingHamlet.d
object.d: Error: module object is in file 'object.d' which cannot be read
import path[0] = .
Failed: dmd  -v -o- './readingHamlet.d' -I'.' >./readingHamlet.d.deps

I feel its probably something to do with the way I have installed/compiled the
library but I'm at the end of my current knowledge in how to fix this. Any
idea on where I should be looking/what I should be looking for? I have been
following the various advices on how to install the library correctly, but
feel I may have gotten myself into more trouble doing this now.

Regards
Brian


More information about the Digitalmars-d mailing list