www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - object.d

reply Ty Tower <tytower hotmail.com.au> writes:
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!  
Feb 09 2008
parent reply Lars Ivar Igesund <larsivar igesund.net> writes:
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
Feb 09 2008
parent reply Ty Tower <tytower hotmail.com.au> writes:
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"  ?
Feb 09 2008
next sibling parent Robert Fraser <fraserofthenight gmail.com> writes:
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.
Feb 09 2008
prev sibling parent Lars Ivar Igesund <larsivar igesund.net> writes:
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
Feb 10 2008