Subject: Re: [Boost-build] Build with VS8 and VS9
From: Vyacheslav Andrejev (mortituris_at_[hidden])
Date: 2014-02-03 00:59:28
VP> I vaguely believe windows.h and friends are now part of Platform
VP> SDK, but I don't remember how a compiler finds them, and which
VP> version is used.
Compiler finds them using environment variables. Boost build executes vcvars32.bat
file that sets them. vcvars32.bat in turn looks up the registry at *\SOFTWARE\Microsoft\Microsoft
SDKs\Windows\CurrentInstallFolder and sets SDK include dirs relative to it.
If it fails, it sets SDK include dir to %VCINSTALLDIR%\PlatformSDK\Include.
Therefore technically all versions of VS should use the same winnt.h and
winioctl.h if the correspondent registry key exists and the user has sufficient
rights to read it.
I would recommend to go to a command line, start vcvars32.bat manually and
check INCLUDE environment variable after that. Or start procmon and check
where winnt.h and winioctl.h come from when compiling using VC8 and VC9.
-- Vyacheslav Andrejev
Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk