Thread overview
Dub, SDL, and Subpackages
Jan 16, 2017
Russel Winder
Jan 16, 2017
rikki cattermole
Jan 16, 2017
Russel Winder
January 16, 2017
The Dub manual says that:


name "mylib"
targetType "none"
dependency "mylib:component1" version="*"
subPackage {
	name "component1"
	targetType "library"
	sourcePaths "component1/source"
	importPaths "component1/source"
}


is reasonable. However whenever I try something of this sort I get:


Main package must have a binary target type, not none. Cannot build.



-- 
Russel. ============================================================================= Dr Russel Winder      t: +44 20 7585 2200   voip: sip:russel.winder@ekiga.net 41 Buckmaster Road    m: +44 7770 465 077   xmpp: russel@winder.org.uk London SW11 1EN, UK   w: www.russel.org.uk  skype: russel_winder

January 16, 2017
On 16/01/2017 11:14 PM, Russel Winder via Digitalmars-d-learn wrote:
> The Dub manual says that:
>
>
> name "mylib"
> targetType "none"
> dependency "mylib:component1" version="*"
> subPackage {
> 	name "component1"
> 	targetType "library"
> 	sourcePaths "component1/source"
> 	importPaths "component1/source"
> }
>
>
> is reasonable. However whenever I try something of this sort I get:
>
>
> Main package must have a binary target type, not none. Cannot build.

Change targetType to "library" and it should work.
It doesn't auto infer that it should be library since you have overriden that ability of it.
January 16, 2017
On Mon, 2017-01-16 at 23:16 +1300, rikki cattermole via Digitalmars-d- learn wrote:
> […]
> Change targetType to "library" and it should work.
> It doesn't auto infer that it should be library since you have
> overriden
> that ability of it.

That isn't going to work because it then tries to build everything and then gets the dependencies wrong.

-- 
Russel. ============================================================================= Dr Russel Winder      t: +44 20 7585 2200   voip: sip:russel.winder@ekiga.net 41 Buckmaster Road    m: +44 7770 465 077   xmpp: russel@winder.org.uk London SW11 1EN, UK   w: www.russel.org.uk  skype: russel_winder