Skip to content

Instantly share code, notes, and snippets.

@rikkimax
Last active April 3, 2017 12:25
Show Gist options
  • Save rikkimax/85b30020e31b58baf8dae843173aded8 to your computer and use it in GitHub Desktop.
Save rikkimax/85b30020e31b58baf8dae843173aded8 to your computer and use it in GitHub Desktop.
``dmd -lib source/foo.d ; dmd test.d foo.lib -Iinclude``
module foo;
class Foo {
int bar();
}
module foo;
class Foo {
int val = 8;
int bar() { return val; }
}
import foo;
void main() {
import std.stdio : writeln;
Foo foo = new Foo;
writeln(foo.bar);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment