[Scons-users] env.Command and _process_ environment variables :-(

William Deegan bill at baddogconsulting.com
Tue Oct 16 13:29:20 EDT 2012


Pedro,

On Oct 16, 2012, at 8:13 AM, Pedro Larroy <pedro.larroy.lists at gmail.com> wrote:


> Hi

>

> Is there a way to pass the process environment to env.Command target?

> I think the environment is not being passed correctly.

>

> I have an env.Command statement to build some artifacts. Before

> calling Scons I call vcvarsall.bat to set the environment variables

> that Visual Studio needs, PATH etc.

>

> This env.Command ends up calling Microsoft's "cl" compiler.

>

> The problem that I have is that "cl" is not found in the PATH, as when

> executing env.Command seems the environment variables are not being

> passed.

>

> I tried creating env with Environment(ENV=os.environ)

>

> When I call the Sconscript, os.environ has the correct environment.

> And when I call the env.Command target manually after setting

> vcvarsall.bat it works fine.



In general SCons should detect the location of your visual studio/VC install. so you shouldn't need to source the vcvarsall.bat.

Which version of visual studio/VC/other are you using?
Which version of windows? (and is it 32 or 64bits)?

Thanks,
Bill


More information about the Scons-users mailing list