diff --git a/playground/msvs/a.cpp b/playground/msvs/a.cpp new file mode 100644 index 00000000..642c45f7 --- /dev/null +++ b/playground/msvs/a.cpp @@ -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() { } + diff --git a/playground/msvs/b.cpp b/playground/msvs/b.cpp new file mode 100644 index 00000000..1e09a10f --- /dev/null +++ b/playground/msvs/b.cpp @@ -0,0 +1 @@ +int u = 64; diff --git a/playground/msvs/main.cpp b/playground/msvs/main.cpp new file mode 100644 index 00000000..dacbb25b --- /dev/null +++ b/playground/msvs/main.cpp @@ -0,0 +1,8 @@ +#include + +extern void foo(); + +int main() { + foo(); + return 0; +} diff --git a/playground/msvs/wscript b/playground/msvs/wscript new file mode 100644 index 00000000..b23c6c25 --- /dev/null +++ b/playground/msvs/wscript @@ -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') +