Hi, The following pull request adds support for VS2017 to SCons: https://bitbucket.org/scons/scons/pull-requests/428/support-for-visual-studio-2017/diff
If you pull down those changes and add it to your SCons files that you installed on your system, it should find VS2017 install location and setup the Environment properly to have the tools (cl.exe, link.exe, etc…) in the PATH. I haven’t tried this myself yet, but I will try to do so. Regards, Ibrahim From: [email protected] [mailto:[email protected]] On Behalf Of Gregg Reynolds Sent: Thursday, July 27, 2017 1:56 PM To: Thiago Macieira <[email protected]> Cc: [email protected] Subject: Re: [dev] building IoTivity with VS 2017 On Thu, Jul 27, 2017 at 3:34 PM, Thiago Macieira <[email protected]<mailto:[email protected]>> wrote: On Thursday, 27 July 2017 13:24:16 PDT Nash, George wrote: > Its due to a single design decision. SCons throws away all environment > variables. You must explicitly import the environment variables inside > SCons. Which we do for things like JAVA_HOME. The idea is that by > isolating the scons from the environment variables you reduce the "it works > on my system" situations that result from environment variables that exist > on one system and not the other. This also means throwing out everything > set by vcvarsall.bat script. > > You can manually modify scons to import PATH but vcarsall.bat does more than > just add cl.exe to the PATH. So scons will typically still have problems > finding some headers and such. That's still somewhat stupid. It must obey the environment, especially PATH. Where is it going to find the compiler in the first place, even on Unix systems? Also, even GCC does have support for environment variables. Setting LD_LIBRARY_PATH is actually VERY common and may be required by the toolchain that the user installed. Overriding those and performing guesswork is stupid and far more likely to cause problems. Easy enough to fix, I expect: " scons does not automatically propagate the external environment used to execute scons to the commands used to build target files. This is so that builds will be guaranteed repeatable regardless of the environment variables set at the time scons is invoked. This also means that if the compiler or other commands that you want to use to build your target files are not in standard system locations, scons will not find them unless you explicitly set the PATH to include those locations. Whenever you create an scons construction environment, you can propagate the value of PATH from your external environment as follows: import os env = Environment(ENV = {'PATH' : os.environ['PATH']}) Similarly, if the commands use external environment variables like $PATH, $HOME, $JAVA_HOME, $LANG, $SHELL, $TERM, etc., these variables can also be explicitly propagated: import os env = Environment(ENV = {'PATH' : os.environ['PATH'], 'HOME' : os.environ['HOME']}) Or you may explicitly propagate the invoking user's complete external environment: import os env = Environment(ENV = os.environ) This comes at the expense of making your build dependent on the user's environment being set correctly, but it may be more convenient for many configurations. -- Thiago Macieira - thiago.macieira (AT) intel.com<https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fintel.com&data=04%7C01%7Ciesmat%40microsoft.com%7C73c8eefdb29246b55d6808d4d531d742%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636367857450102796%7CUnknown%7CVW5rbm93bnx7IlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiT3RoZXIifQ%3D%3D%7C-1&sdata=VUa87Dl2L7Qy3ClFTAc5Iu3ozS6rUZFFJQ7DBwtdhSE%3D&reserved=0> Software Architect - Intel Open Source Technology Center _______________________________________________ iotivity-dev mailing list [email protected]<mailto:[email protected]> https://lists.iotivity.org/mailman/listinfo/iotivity-dev<https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.iotivity.org%2Fmailman%2Flistinfo%2Fiotivity-dev&data=04%7C01%7Ciesmat%40microsoft.com%7C73c8eefdb29246b55d6808d4d531d742%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636367857450102796%7CUnknown%7CVW5rbm93bnx7IlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiT3RoZXIifQ%3D%3D%7C-1&sdata=0GOl0DfqM09PL9IVij4CuxrxE93IireCj%2FzA9ksfqKs%3D&reserved=0>
_______________________________________________ iotivity-dev mailing list [email protected] https://lists.iotivity.org/mailman/listinfo/iotivity-dev
