XMLP

Michael Rynn michaelrynn at optusnet.com.au
Tue Nov 17 02:53:05 PST 2009


> F:\DLang\DEx\D2Ex>F:\laguangeD\dlang\dtwo\dmd\windows\bin\dmd anoy.d
> object.d: Error: module object cannot read file 'object.d'
> 
> F:\DLang\DEx\D2Ex>
> 
> What does this mean?I can compile all my d2 programs just use: dmd *.d
> under any path:

I remember getting that same message compiling with DMD.
Especially if I had played around with the D compiler sc.ini file trying 
to compile Tango from source with the latest D compiler. 

What it means is the compiler tries to search its imports paths, which is 
set in the sc.ini file with -I and can be overridden in the command line.
I then searched for files called object.* in src and imports and pointed 
the -I paths there to see what would happen. After it goes away I forget 
about it.
My latest sc.ini says.

DFLAGS="-I%@P%\..\..\src\phobos" "-I%@P%\..\..\src\druntime\import"

Now there is a file called object.di inside ..\src\druntime\import.

Nowadays I just take the plain vanilla setup, keeping seperate 
distribution trees for phobos dmd & dmd2, and dmd tango.

My basic windows dmd setup.  When I test with a new version of dmd2, say 
2.036, I replace an entire C:\D\dmd2 folder with the new distribution 
zip.   


I run the command prompt cmd.exe, CD to the source directory where I have 
a build*.bat files.  The batch files run the dmd compiler by calling it 
with its full path C:\D\dmd2\windows\bin\dmd.exe , and usually the dmd2 
compiler figures out the standard import locations and libraries from its 
relative path using the command line invocation argument.

If I am using tango I have downloaded the current approved windows binary 
release complete with matching dmd 1.xxx version.  Since it also works 
out of the box, my tango batch path is C:\D\tango\bin\dmd.exe, and the 
sc.ini therein does tango paths.

If I want a convenience of typing dmd directly , I set up batch files to 
configure the current PATH.

REM StartMyD2Env.bat in C:\bin\codeblocks\

PATH=c:\D\dmd2\windows\bin;c:\D\dm\bin;%windir%\system32;%windir%;%windir%
\system32\wbem
start "D2 environment" Codeblocks.exe

and run it from a shortcut  cmd.exe /K c:\bin\StartMyD2Env.bat

Otherwise every old dmd.exe and dll, and other developments systems in 
forgotten folders in my system path want to get in on the act.






-- 
michael  *^&^*



More information about the Digitalmars-d mailing list