www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Dub, SDL, and Subpackages

reply Russel Winder via Digitalmars-d-learn <digitalmars-d-learn puremagic.com> writes:
The Dub manual says that:


name "mylib"
targetType "none"
dependency "mylib:component1" version=3D"*"
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.



--=20
Russel.
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D
Dr Russel Winder      t: +44 20 7585 2200   voip: sip:russel.winder ekiga.n=
et
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
Jan 16 2017
parent reply rikki cattermole <rikki cattermole.co.nz> writes:
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.
Jan 16 2017
parent Russel Winder via Digitalmars-d-learn <digitalmars-d-learn puremagic.com> writes:
On Mon, 2017-01-16 at 23:16 +1300, rikki cattermole via Digitalmars-d-
learn wrote:
 [=E2=80=A6]
 Change targetType to "library" and it should work.
 It doesn't auto infer that it should be library since you have
 overriden=C2=A0
 that ability of it.
That isn't going to work because it then tries to build everything and then gets the dependencies wrong. --=20 Russel. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D Dr Russel Winder t: +44 20 7585 2200 voip: sip:russel.winder ekiga.n= et 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
Jan 16 2017