An issue with trying to go back to Tango after dsss install tango - conflicting 'std' dirs.

Bill Baxter dnewsgroup at billbaxter.com
Thu Feb 21 17:25:58 PST 2008


I ran across this trying to get my Windows system set up to allow 
seamless switching back and forth between tango and phobos.

Not sure whose bug tracker to put this in because it involves Tango and 
DSSS and maybe also Tangobos.  So here it is:

If you've installed tango/tangobos using DSSS there will be a 'std' 
directory in your dsss/include/d folder.

DSSS seems to preferentially look there for includes.

Thus even if you
1) change your dsss profile back to phobos by copying 
"dsss\etc\rebuild\default.phobos" back to "default", and
2) make the appropriate changes to sc.ini,

Phobos code will not compile with dsss because it finds that std 
directory under dsss first.

Renaming the dsss\include\d\std folder to something else does the trick.

--------------

So for all who are interested here's how I do Tango/Phobos switching on 
Windows:
This makes the change globally.  It does not allow you to be using tango 
in one shell and phobos in another.  Given the problem with 'std' I'm 
not sure there is a way to make that work currently.

The switching is done with two batch files "usephobos.bat" and 
"usetango.bat" (attached in a zip also).

---usetango.bat---
@ECHO OFF
echo Setting up DMD environment for using Tango runtime libraries...
copy "%DMDDIR%\dmd\bin\sc.tango.ini" "%DMDDIR%\dmd\bin\sc.ini"
copy "%DMDDIR%\dsss\etc\rebuild\default.tango" 
"%DMDDIR%\dsss\etc\rebuild\default"
ren "%DMDDIR%\dsss\include\d\std_tango_" std
echo Done.
---

---usephobos.bat---
@ECHO OFF
echo Setting up DMD environment for using Phobos runtime libraries...
copy "%DMDDIR%\dmd\bin\sc.phobos.ini" "%DMDDIR%\dmd\bin\sc.ini"
copy "%DMDDIR%\dsss\etc\rebuild\default.phobos" 
"%DMDDIR%\dsss\etc\rebuild\default"
ren "%DMDDIR%\dsss\include\d\std" std_tango_
echo Done.
---

I also define an environment variable "DMDDIR" to point to the root of 
my D install.  And I have a copy of the sc.ini files for tango and 
phobos saved under the names sc.tango.ini and sc.phobos.ini.

--bb
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tangoswitch.zip
Type: application/octet-stream
Size: 1064 bytes
Desc: not available
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20080222/17263550/attachment.obj>


More information about the Digitalmars-d mailing list