msvc

Microsoft Visual C++/Intel C++ compiler support

If you get detection problems, first try any of the following:

chcp 65001
set PYTHONIOENCODING=...
set PYTHONLEGACYWINDOWSSTDIO=1

Usage:

$ waf configure --msvc_version="msvc 10.0,msvc 9.0" --msvc_target="x64"

or:

def configure(conf):
        conf.env.MSVC_VERSIONS = ['msvc 10.0', 'msvc 9.0', 'msvc 8.0', 'msvc 7.1', 'msvc 7.0', 'msvc 6.0', 'wsdk 7.0', 'intel 11', 'PocketPC 9.0', 'Smartphone 8.0']
        conf.env.MSVC_TARGETS = ['x64']
        conf.load('msvc')

or:

def configure(conf):
        conf.load('msvc', funs='no_autodetect')
        conf.check_lib_msvc('gdi32')
        conf.check_libs_msvc('kernel32 user32')
def build(bld):
        tg = bld.program(source='main.c', target='app', use='KERNEL32 USER32 GDI32')

Platforms and targets will be tested in the order they appear; the first good configuration will be used.

To force testing all the configurations that are not used, use the --no-msvc-lazy option or set conf.env.MSVC_LAZY_AUTODETECT=False.

Supported platforms: ia64, x64, x86, x86_amd64, x86_ia64, x86_arm, amd64_x86, amd64_arm

Compilers supported:

  • msvc => Visual Studio, versions 6.0 (VC 98, VC .NET 2002) to 15 (Visual Studio 2017)

  • wsdk => Windows SDK, versions 6.0, 6.1, 7.0, 7.1, 8.0

  • icl => Intel compiler, versions 9, 10, 11, 13

  • winphone => Visual Studio to target Windows Phone 8 native (version 8.0 for now)

  • Smartphone => Compiler/SDK for Smartphone devices (armv4/v4i)

  • PocketPC => Compiler/SDK for PocketPC devices (armv4/v4i)

To use WAF in a VS2008 Make file project (see http://code.google.com/p/waf/issues/detail?id=894) You may consider to set the environment variable “VS_UNICODE_OUTPUT” to nothing before calling waf. So in your project settings use something like ‘cmd.exe /C “set VS_UNICODE_OUTPUT=& set PYTHONUNBUFFERED=true & waf build”’. cmd.exe /C “chcp 1252 & set PYTHONUNBUFFERED=true && set && waf configure” Setting PYTHONUNBUFFERED gives the unbuffered output.

Features defined in this module: