setenv in Windows + phobos and tango

tomD t_demmer at spam.web.de
Tue Mar 6 11:25:57 PST 2007


Daniel Keep Wrote:

> 
> There's std.process.execve, which you can pass an environment to, but
> the problem with that is that there doesn't seem to be any way to
> actually *get* the complete environment so I can modify PATH and pass
> the rest unaltered.
> 
> So, is there:
> 
> A) any way to do this, or

Yes. See my bug report #1004 in the bug list on how to 
do that with spawnvpe. execvpe should work along the
same line.

> B) any other sane way to get tango and phobos to co-exist?  And no,
> having to run a "switch" application simply doesn't cut it.
Why not? Try something like this:
1) Put phobos.lib into @P/../lib/phobos/
   put tango into @P/../lib/tango/ (but as phobos.lib)
2) nuke the lib line from your sc.ini
3) in dmd-phobos add
 LIB="@P/../lib/phobos";"%@P%\..\lib";"%@P%\..\mfc\lib";%LIB%
to the environment and exec dmd with the whole command line
4) in dmd-tango do the same, just change the location.

Should work (tm), but then again, I did not try :-)

Ciao
Tom


More information about the Digitalmars-d-learn mailing list