Last active
April 3, 2017 12:25
-
-
Save rikkimax/85b30020e31b58baf8dae843173aded8 to your computer and use it in GitHub Desktop.
``dmd -lib source/foo.d ; dmd test.d foo.lib -Iinclude``
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module foo; | |
class Foo { | |
int bar(); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module foo; | |
class Foo { | |
int val = 8; | |
int bar() { return val; } | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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