Let’s say you need to compile your C++ project under MS Windows and you need to use the Microsoft’s toolchain instead of MinGW. Buying the whole Visual Studio is not necessary. I like a simple combination gvim+scons+gcc which gives me a high amount of flexibility. I just needed to switch the gcc to the MS compiler.
There are 2 options: Visual C++ Express or Windows SDK. SDK is better because:
- contains 64-bit compiler,
- contains debugging and profiling tools.
I had two little problems with running this SDK toolchain under Windows 7. There is a broken vcvars32.bat. Running it gives an error:
ERROR: Cannot determine the location of the VS Common Tools folder.
Solution is simple. Patch mentioned in the forum answer has a little flaw. Paths must end with a backslash. Then the compiler gave me another error:
fatal error C1083: Cannot open include file: ‘windows.h’: No such file or directory
Insert following line at the beginning of vcvars32.bat:
@SET WindowsSdkDir=c:\Program Files\Microsoft SDKs\Windows\v7.1\
[…] to download. First I tried Windows SDK 8 but it does not contain the compilers and stuff as before. Now the Visual Studio Express 2012 has all the development tools. Download only the ISO image. It […]
Pingback by Windows 8 SDK | welcome to the world of... — 2014-03-08 @ 01:14