Thread overview
object.d
Feb 09, 2008
Ty Tower
Feb 09, 2008
Lars Ivar Igesund
Feb 10, 2008
Ty Tower
Feb 10, 2008
Robert Fraser
Feb 10, 2008
Lars Ivar Igesund
February 09, 2008
OK so I'm getting the hang of this now.
What I don't understand is when installing Tango I see a line to backup "object.d" -Why?

What exactly is meant by backup ?  I copied the file and renamed it to "objectCopy.d" -so what do I do with it ?

Doesn't Tango come with an "object.d" file? That would seem stupid as it is the base class for all objects.

So when trying to compile under Tango if I don't put "object.d" in the current directory the compiler complains that it can't find it .

What a mess this Tango Phobos thing is!
February 09, 2008
Ty Tower wrote:

> OK so I'm getting the hang of this now.
> What I don't understand is when installing Tango I see a line to backup
> "object.d" -Why?

Because Phobos' and Tango's object.d are different.

> 
> What exactly is meant by backup ?  I copied the file and renamed it to "objectCopy.d" -so what do I do with it ?

You copy it back if you go back to Phobos.

> Doesn't Tango come with an "object.d" file? That would seem stupid as it is the base class for all objects.

Indeed. Although note that it is called object.di in Tango.

-- 
Lars Ivar Igesund
blog at http://larsivi.net
DSource, #d.tango & #D: larsivi
Dancing the Tango
February 10, 2008
Thanks Lars
Now Ok " object.di" is an interface file so it loads a lesser part of "object.d". Not all of "object.d"

So I am experimenting with "dwt" which I have in  directory " dwt-linux-tango"
Trying to compile that I get an error :-
[tytower@linuxbox TangoExamples]$ dmd dwt-linux-tango/layout/GridLayout.d
object.d: module object cannot read file 'object.d'

So this is a tango compatible file why is it looking for "object.d"  ?
February 10, 2008
Ty Tower wrote:
> Thanks Lars
> Now Ok " object.di" is an interface file so it loads a lesser part of "object.d". Not all of "object.d"
> 
> So I am experimenting with "dwt" which I have in  directory " dwt-linux-tango"  Trying to compile that I get an error :-
> [tytower@linuxbox TangoExamples]$ dmd dwt-linux-tango/layout/GridLayout.d
> object.d: module object cannot read file 'object.d'
> 
> So this is a tango compatible file why is it looking for "object.d"  ?

The D compiler will report that, but is actually looking for a module "object". It will look for ".di" file first, then a ".d" file.
February 10, 2008
Ty Tower wrote:

> Thanks Lars
> Now Ok " object.di" is an interface file so it loads a lesser part of
> "object.d". Not all of "object.d"

This is not a problem, as the implementation is in the runtime and will be
linked in when you link the application. It is no different with Phobos,
except that it doesn't use the .di extension.

> So I am experimenting with "dwt" which I have in  directory " dwt-linux-tango" Trying to compile that I get an error :- [tytower@linuxbox TangoExamples]$ dmd dwt-linux-tango/layout/GridLayout.d object.d: module object cannot read file 'object.d'

This means that object.[d,di] isn't installed where the compiler expects it, or the compiler isn't told where it is (the -I switch). It will probably be useful to read Tango's install instructions.

http://www.dsource.org/projects/tango/wiki/TopicInstallTango

-- 
Lars Ivar Igesund
blog at http://larsivi.net
DSource, #d.tango & #D: larsivi
Dancing the Tango