[Scons-users] Adding external environment
Mats Wichmann
mats at wichmann.us
Mon Jul 29 09:16:09 EDT 2019
On 7/29/19 5:37 AM, Hanusek Tomasz wrote:
> Hi,
>
> I am new and I can not manage with external enviroment. I need to change
> some parameters inside the code and then compile this chenged code.
>
> I have 'ready to use' scons.py, SConstruct and different files.
>
> If I just run scons I will obtain:
>
> '
> scons: warning: No installed VCs
> File
> "C:\Users\48693\Desktop\TRACE-V51262-Source\TRACE-V51262-Source\Source\SConstruct",
> line 20, in <module>
>
> scons: warning: No version of Visual Studio compiler found - C/C++
> compilers most likely not set correctly
Just a couple more questions: which version of scons? do you have
vswhere installed?
it should find a compiler, and for the 2017/2019 editions it should use
vswhere to do so. it expects to find vswhere at
C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe
(on 32-bit Windows, without the "(x86)").
With this line you were trying add to the search path?
env = Environment(ENV = {'C:\Program Files (x86)\Microsoft Visual
Studio\2017\Community\Common7\IDE\devenv' : os.environ['C:\Program Files
(x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\devenv']})
ENV is a dictionary, so it needs to be set up with the right key-value
pairs. I looks like you replaced the key 'PATH' with a pathname
component, you don't want to do that, just leave it as:
env = Environment(ENV={'PATH': os.environ['PATH']})
if you just want to add one pathname component, not import the whole
external path, use PrependENVPath or AppendENVPath.
we should be able to figure out why it's not finding your compiler.
You can do a little bit of debugging by putting in this line:
print(env.Dump('ENV'))
it will show you what value for PATH scons has built up.
More information about the Scons-users
mailing list