Add an example for compiling with msvc

This commit is contained in:
Rafaël Kooi 2019-10-22 04:44:59 +02:00
parent 29c20e3e30
commit 9f8d8eb66e
2 changed files with 32 additions and 0 deletions

11
playground/msvc/test.c Normal file
View File

@ -0,0 +1,11 @@
#include <stdio.h>
int main(int argc, char** argv)
{
(void)argc;
(void)argv;
puts("This is a simple test program.\n");
return 0;
}

21
playground/msvc/wscript Normal file
View File

@ -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')