x86 on a 64-bit system with SCons and MSVC

As stated previously, I’m trying to get into DirectX 11. For a change I’m not using Visual Studio, but Sublime Text and Scons, with the MSVC compiler because of the DX11 header incompatibility with MinGW.

Link time, d3d11.lib et al... Link error. Unresolved symbol for D3D11CreateDeviceAndSwapChain. What? I did set the library path (to the x86 binaries) and linked to the lib file...

Sure. But by default, Scons uses the MSVC version matching your system: 64-bit for me. The solution is to add TARGET_ARCH='x86' in the Environment constructor call. Adding it afterwards by using Append doesn’t work.