add spec for building a shared library using D

This commit is contained in:
josh committed 2017-06-07 15:22:20 -04:00
1 parent db2ec82a25
commit 10d4c647b9
4 files changed
+34

No files matched your search

@@ -0,0 +1,9 @@
Rscons::Environment.new do |env|
env["CPPPATH"] << "src/lib"
libmine = env.SharedLibrary("libmine", Dir["src/lib/*.d"])
env.Program("test-shared.exe",
Dir["src/*.c"],
"LIBPATH" => %w[.],
"LIBS" => %w[mine])
env.build_after("test-shared.exe", libmine.to_s)
end
+6
View File
@@ -0,0 +1,6 @@
import core.stdc.stdio;
extern (C) void one()
{
printf("Hi from one()\n");
}
+6
View File
@@ -0,0 +1,6 @@
import core.stdc.stdio;
extern (C) void two()
{
printf("Hi from two()\n");
}