std.process.system and friends

Rainer Schuetze r.sagitario at gmx.de
Sat Feb 2 06:50:05 PST 2013



On 02.02.2013 12:41, Gor Gyolchanyan wrote:
> 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?

Have you tried putenv? It is only declared in core.sys.posix.stdlib, but 
the dmc-runtime-library must have it as dmd is also using it.



More information about the Digitalmars-d-learn mailing list