From 9f8d8eb66e9b2b725ad73056cf392944559f8578 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C3=ABl=20Kooi?= <3961583-RA-Kooi@users.noreply.gitlab.com> Date: Tue, 22 Oct 2019 04:44:59 +0200 Subject: [PATCH] Add an example for compiling with msvc --- playground/msvc/test.c | 11 +++++++++++ playground/msvc/wscript | 21 +++++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 playground/msvc/test.c create mode 100644 playground/msvc/wscript diff --git a/playground/msvc/test.c b/playground/msvc/test.c new file mode 100644 index 00000000..9476f106 --- /dev/null +++ b/playground/msvc/test.c @@ -0,0 +1,11 @@ +#include + +int main(int argc, char** argv) +{ + (void)argc; + (void)argv; + + puts("This is a simple test program.\n"); + + return 0; +} diff --git a/playground/msvc/wscript b/playground/msvc/wscript new file mode 100644 index 00000000..18c40c26 --- /dev/null +++ b/playground/msvc/wscript @@ -0,0 +1,21 @@ +#!/usr/bin/env python +# encoding: utf-8 + +top = '.' +out = 'build' + +def options(opt): + opt.load('msvc') + +def configure(cfg): + cfg.load('msvc') + cfg.load('msvc_pdb') + cfg.env.append_value('CFLAGS','/Zi') + cfg.env.append_value('LDFLAGS','/DEBUG') + +def build(bld): + bld.program( + name='test', + source=['test.c'], + target='test', + use='CRT_MULTITHREADED_DLL')