std.process.system and friends

Gor Gyolchanyan gor.f.gyolchanyan at gmail.com
Sat Feb 2 03:41:00 PST 2013


Good day,

I'm trying to write a script in D for building D projects. I want 
to set the environment variable LIB for optlink to be able to 
pick up library files from where I put them after compiling 
dependencies.

The problem is, that the std.process.setenv is only available 
under Linux and std.process.system("set LIB=target") does not do 
anything. I guess std.process.system creates a separate process 
every time, sets the local environment variable and exists, 
erasing the local environment variable.
I tried supplying multiple commands at once by specifying a 
multi-line argument to std.process.system, but it didn't work at 
all.

How can I set my local envoronment variables so that further 
calls to std.process.system can pick  it up?

Regards,
Gor Gyolchanyan.


More information about the Digitalmars-d-learn mailing list