Solution file generation example

This commit is contained in:
Thomas Nagy 2016-01-26 20:00:07 +01:00
parent 9a7381b20e
commit e10998ff54
No known key found for this signature in database
GPG Key ID: 67A565EDFDF90E64
4 changed files with 43 additions and 0 deletions

13
playground/msvs/a.cpp Normal file
View File

@ -0,0 +1,13 @@
#ifdef _MSC_VER
# define testshlib_EXPORT __declspec(dllexport)
#else
# define testshlib_EXPORT
#endif
extern testshlib_EXPORT void foo();
static const int truc=5;
void foo() { }

1
playground/msvs/b.cpp Normal file
View File

@ -0,0 +1 @@
int u = 64;

8
playground/msvs/main.cpp Normal file
View File

@ -0,0 +1,8 @@
#include <iostream>
extern void foo();
int main() {
foo();
return 0;
}

21
playground/msvs/wscript Normal file
View File

@ -0,0 +1,21 @@
#! /usr/bin/env python
# encoding: utf-8
# Thomas Nagy, 2016 (ita)
VERSION='0.0.1'
APPNAME='msvs_test'
top = '.'
out = 'build'
def options(opt):
opt.load('compiler_cxx msvs')
def configure(conf):
conf.load('compiler_cxx')
def build(bld):
bld.shlib(source='a.cpp', target='mylib', vnum='9.8.7')
bld.program(source='main.cpp', target='app', use='mylib')
bld.stlib(source='b.cpp', target='stlib')