Forum Navigation
Directory problem under Windows XP, D newbie
Posted: 09/12/07 13:09:31What is the directory structure you are assumed to use with D and Tango? The tutorials I have found have been contradictory or vague. I'm trying to build Tango from the Windows sources. I have tried the binaries to no avail. Btw, is there any way to get more verbose error info from DMD.EXE than just -v ? I would really like to see where it is looking for import modules when it says it can't find them. Then maybe I would understand what's going wrong.
My directory structure is C:\DM and C:\DMD, I unzipped Tango into C:\DMD\IMPORT.
I've set up sc.ini as follows: C:\dmd\bin>type sc.ini [Version] version=7.51 Build 020
[Environment] LIB="c:\dmd\import\lib;%@P%\..\lib" DFLAGS="-Ic:\dmd\import -Ic:\dmd\import\tango" -version=Tango -L+tango.lib LINKCMD=c:\dmd\bin\link.exe
(hardcoded just in case)
My path is PATH=C:\DMD\BIN;C:\DM\BIN
I follow the http://dsource.org/projects/tango/wiki/TopicInstallTango (would be nice with a link from the Tango front page btw), and run build-dmd.bat. It fails but I don't know why. If I redirect the output to a file I can see that an Errorlevel 1 is followed when processing compiler\dmd\win32.mak. I also get console messages saying
Cannot find C:\dmd\import\lib\compiler\dmd\aaA.obj. Cannot find C:\dmd\import\lib\compiler\dmd\util\console.obj. Cannot find C:\dmd\import\lib\compiler\dmd\typeinfo\ti_AC.obj Cannot find C:\dmd\import\lib\common\tango\*.di. Cannot find C:\dmd\import\lib\common\tango\core\BitManip?.obj. Cannot find C:\dmd\import\lib\common\tango\stdc\wrap.obj. Cannot find C:\dmd\import\lib\common\tango\*.di. Cannot find C:\dmd\import\lib\common\tango\core\BitManip?.obj. Cannot find hitta C:\dmd\import\lib\common\tango\stdc\wrap.obj.
Therefor I tried building the .obj files manually one by one with dmd -c. When I did this I had to change alot of import statements because dmd would say that it couldn't find util/string.d and similar when the .d file contained "import util.string;". The ti_Ireal.d couldn't find typeinfo/ti_real.d and so on. I changed all the import statements to not include the directory names, in some cases copying the file referred to when it was not in the same directory as the other files. I don't understand how this was supposed to work, do you people set up some special PATH variable or something? Because it seemes to me that it was really bugs, because only some of the files would contain directory names in the import statements.
Anyway, build-dmd can't make the obj-files and I can't pinpoint when it fails as DOS won't let me log all the outputted text (or does it? I can't remember if one can redirect stderr). It refuses to compile ti_acdouble.d saying that module ti_cdouble can't find ti_cdouble.d (?!).
I'm really lost. It can't be this hard to build Tango on Windows...
Also I must say that I think the general lack of comments in batch files and even .d files is probably keeping alot of people away from D. It is simply very frustrating trying to get started. I would have given up a long time ago if I was only trying to check out the language.