diff options
Diffstat (limited to 'test/D/MixedDAndC/Image')
| -rw-r--r-- | test/D/MixedDAndC/Image/SConstruct | 15 | ||||
| -rw-r--r-- | test/D/MixedDAndC/Image/cmod.c | 3 | ||||
| -rw-r--r-- | test/D/MixedDAndC/Image/dmod.d | 6 | ||||
| -rw-r--r-- | test/D/MixedDAndC/Image/proj.d | 12 |
4 files changed, 36 insertions, 0 deletions
diff --git a/test/D/MixedDAndC/Image/SConstruct b/test/D/MixedDAndC/Image/SConstruct new file mode 100644 index 0000000..176c4d3 --- /dev/null +++ b/test/D/MixedDAndC/Image/SConstruct @@ -0,0 +1,15 @@ +# -*- codig:utf-8; -*- + +import os + +environment = Environment( +) +# CFLAGS=['-m64'], +# DLINKFLAGS=['-m64'], +# DFLAGS=['-m64', '-O']) + +environment.Program('proj', [ +'proj.d', +'dmod.d', +'cmod.c', +]) diff --git a/test/D/MixedDAndC/Image/cmod.c b/test/D/MixedDAndC/Image/cmod.c new file mode 100644 index 0000000..31be5e9 --- /dev/null +++ b/test/D/MixedDAndC/Image/cmod.c @@ -0,0 +1,3 @@ +int csqr(int arg) { + return arg*arg; +} diff --git a/test/D/MixedDAndC/Image/dmod.d b/test/D/MixedDAndC/Image/dmod.d new file mode 100644 index 0000000..c609b9c --- /dev/null +++ b/test/D/MixedDAndC/Image/dmod.d @@ -0,0 +1,6 @@ +module dmod; +import std.stdio; + +void print_msg() { + writeln("Hello, this is a test program for the new SCons D support"); +} diff --git a/test/D/MixedDAndC/Image/proj.d b/test/D/MixedDAndC/Image/proj.d new file mode 100644 index 0000000..3e0bf95 --- /dev/null +++ b/test/D/MixedDAndC/Image/proj.d @@ -0,0 +1,12 @@ +import std.stdio; +import dmod; + +extern (C) { + int csqr(int arg); +} + +void main() { + print_msg(); + auto i = 17; + writefln("The square of %d is %d", i, csqr(i)); +} |
