On 06/07/2018 11:35 PM, Ranganath.S wrote:
> Hello Sir,
>
> Thanks for the advise. I tried adding env = Environment(ENV =
> {'PATH' : os.environ['PATH']}) , in the scons.py file. But, it is giving
> the below error
> env = Environment(ENV = {'PATH' : os.environ['PATH']})
> NameError: name 'Environment' is not defined
> SCons failed - exiting run.bat with code 5
>
> Please guide me in which file I should add this.
It's not clear what you are doing here... but you shouldn't be modifying
scons (and this really isn't what you want to do as your introduction to
iotivity: this is something that should be working, as long as you use
scons 3.0.1). The stanza you have quoted is something that would go
into an scons script (SConstruct or SConscript), but the iotivity scons
scripts already create "env" this way, so you wouldn't want to duplicate
it. This happens in build_common/SConscript. In fact, the the existing
path is already added to main construction environment in the Windows
case, via this piece of code:
if target_os in ['windows']:
# UnpackAll.py needs access to system PATH components that SCons
# does not include by default - e.g., the path to 7z.exe.
env.AppendUnique(PATH=os.environ['PATH'])
so there is nothing to add in our case.
....
Have you followed the advice Thiago gave? Namely...
when VS is installed, it creates links for command prompts with the
proper setup. So if you start typing "cmd" in the search box, it should
give you several choices. Pick the one that looks something like:
Developer Command Prompt for VS2017
In that window, type "cl" to see if it's finding it.
If it is, run scons in that window - which has the paths set up correctly.
Sorry in my case I don't have a system with VS2017 so I'm going by more
general principles.
SCons aside: prior to scons 3.0, scons rooted around in the registry
looking for the compiler. VS2017 allows multiple concurrent installs,
so it does not any longer write to the registry. scons was modified to
use other techniques to try to find the compiler, but if it's in the
path, the job is much easier.
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#9689):
https://lists.iotivity.org/g/iotivity-dev/message/9689
Mute This Topic: https://lists.iotivity.org/mt/21590506/21656
Group Owner: [email protected]
Leave: https://lists.iotivity.org/g/iotivity-dev/unsub
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-