Hi,
I recently started using dub, and I've reviewed some recent posts about using subpackages, but I didn't found a solution.
I've created a really simple project following the documentation for building multiple components, in fact I replicated the sample, but I'm getting always the same error:
Error executing command run: Main package must have a binary target type, not none. Cannot build.
I've tested with stable version and with master version of dub, same error on both.
What I'm trying to do is building a library in component1 and an executable in component2 using component1 as a dependency, and build everything from mylib directory.
Am I missing something or maybe I didn't understood how subpackages should work?
main dub.json:
{
"name": "mylib",
"description": "A minimal D application.",
"copyright": "Copyright © 2014, rgaitan",
"authors": ["rgaitan"],
"targetType": "none",
"dependencies": {
"mylib:component1": "*",
"mylib:component2": "*"
},
"subPackages": [
"./component1/",
"./component2/"
]
}
component1 dub.json:
{
"name": "component1",
"description": "A minimal D application.",
"copyright": "Copyright © 2014, rgaitan",
"authors": ["rgaitan"],
"targetType": "library",
"dependencies": {
}
}
component2 dub.json:
{
"name": "component2",
"description": "A minimal D application.",
"copyright": "Copyright © 2014, rgaitan",
"authors": ["rgaitan"],
"targetType": "executable",
"dependencies": {
"mylib:component1": "*"
}
}
Thank you,
Rafa.