How do I use dub?

Minas Mina via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Fri Oct 24 16:46:50 PDT 2014


I intent to use D to make a small 2D game.
I have downloaded eclipse, DDT plugin and dub. I also set the 
path to dub in eclipse.

So I made a new project, tested a writeln and it worked. The next 
step was to add some dependencies for derelict. I need SFML for 
now (and DerelictUtils of course).

So this is what I've done:

{
	"name" : "DTest",
	"description" : "A minimal D bundle.",
	"dependencies" : {
		
		"derelict-util": ">=1.0.3",
		"derelict-sfml2": "~2.1"
	},
	
	"versions-x86_64": ["UseAmd64Impl"],
	"lflags": ["-I/home/minas/.dub/packages/derelict-sfml2-2.1/lib", 
"-LDerelictSFML2"]
}


The way I specified the library seems very ugly to me. 
Essentially it's a full path... How can I tell dub to use it by 
locating it automatically from its local repository?


More information about the Digitalmars-d-learn mailing list