[Scons-users] How to get path of Windows SDK using SCons

Mats Wichmann mats at wichmann.us
Fri Sep 6 10:56:33 EDT 2019


On 9/6/19 7:39 AM, Lukasz Golonka wrote:
> Hi all,
> 
> I'd like to ask how can I get path to an installed Windows SDK using
> SCons. I've looked into the source code, and it looks Like SCons is
> capable of detecting it, but I don't understand how to get the path. Any
> help would be appreciated, as I am really a beginner with SCons.

scons uses the Microsoft-provided vswhere to look for the compiler for
versions where that works.

not entirely sure what your question is because the term SDK is used so
liberally in the Windows world... I have dozens of things labeled SDK on
my one "real" machine. SCons does search for an "SDK" but I'm not
actually sure what it does with that information.  But if you're just
looking for where the compiler is, this simple stanza should work:


env = Environment()
compiler = env['CC']
print(env.WhereIs(compiler))

you need to do this on an instantiated environment so scons will have
gone through the tool setup process.




More information about the Scons-users mailing list