Skip to content

Instantly share code, notes, and snippets.

@gilesc
Created July 26, 2013 15:20
Show Gist options
  • Save gilesc/6089724 to your computer and use it in GitHub Desktop.
Save gilesc/6089724 to your computer and use it in GitHub Desktop.
Dub subpackage woes
module app1;
import std.stdio;
import lib1;
void main() {
add(2,3).println;
}
module lib1;
int add(int x, int y) {
return x - y;
}
{
"name": "testpkg",
"targetType": "none",
"version": "~master",
"description": "An example project skeleton",
"homepage": "http://example.org",
"copyright": "Copyright © 2000, Your Name",
"authors": [
"Your Name"
],
"dependencies": {
"testpkg:lib1": "~master",
"testpkg:app1": "~master"
},
"targetPath": "lib",
"importPaths": ["import"],
"subPackages": [
{
"name":"lib1",
"version": "~master",
"targetType": "library",
"targetName": "lib1",
"targetPath": "lib",
"importPaths": ["import"],
"sourcePaths": ["import/lib1"]
},
{
"name":"app1",
"version": "~master",
"targetType": "executable",
"targetName": "app1",
"targetPath": "bin",
"importPaths": ["import"],
"sourcePaths": ["import/app1"],
"dependencies": {"testpkg:lib1": "~master"}
}
],
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment