RS,

This can be one of the most frustrating errors you can encounter with SCons.  
Since SCons does not propagate environment variables, including PATH, by 
default even if you are able to see ‘cl.exe’ before you run scons it may not be 
able to find it in the scons scripts. There is a logical reason to not pull in 
the environment variables it helps avoid the ‘It works for me!’ build 
situations.

I would check:

-          Are you using the latest version of SCons if you are using an older 
compiler you can often get away with an older version of scons but for the new 
compiler you need the latest version of SCons as well. You should be running 
scons version 3.0.1

-          Are you using the default install location for Visual Studio? SCons 
searches for the default install locations.


The SCons faq page has some work around solutions: 
https://scons.org/faq.html#Why_doesn.27t_SCons_find_my_compiler.2BAC8-linker.2BAC8-etc..3F_I_can_execute_it_just_fine_from_the_command_line.

None of the solutions are great they are a sledge hammer approach of pulling in 
all of PATH or all of the environment variables and are generally frowned upon 
as bad practice.

George Nash

p.s. You can use python3 now, however you will run into issue IOT-3080 
(https://jira.iotivity.org/browse/IOT-3080) see the top comment for a work 
around if you switch.


From: iotivity-dev@lists.iotivity.org [mailto:iotivity-dev@lists.iotivity.org] 
On Behalf Of Ranganath.S
Sent: Thursday, June 7, 2018 5:01 AM
To: iotivity-dev@lists.iotivity.org
Subject: [dev] cl not recognised


Hello,

    I am trying to compile Iotivity 1.3.1 on Windows 10 using Visual Studio 17. 
I have installed all the dependencies like Python 2, Scons and CMake. I am 
following the build instruction on https://wiki.iotivity.org/windows. I am 
ending  up with error saying

                            'cl' is not recognized as an internal or external 
command, operable program or batch file.

    I tried executing vcvars.bat and vcvars140.bat, but still getting the same 
problem. Please advise on how to go about.

Regards,

RS



________________________________
The content of this email is confidential and intended for the recipient 
specified in message only. It is strictly forbidden to share any part of this 
message with any third party, without a written consent of the sender. If you 
received this message by mistake, please reply to this message and follow with 
its deletion, so that we can ensure such a mistake does not occur in the future.


Reply via email to