www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - DUB help plz

reply "K.K." <trampzy yahoo.com> writes:
I've been trying to figure DUB out and have been having a bit of
trouble. I'm trying to make a simple program that uses Derelict
GL3 and SDL2. I keep getting this error though:

derelict.util.exception.SharedLibLoadException C:\Users\Kyoji\AppData\Roaming\dub\packages\derelict-util-1.0.1\source\derelict\util\exception.d(35):
Failed to load one or more shared libraries:
          SDL2.dll - The specified module could not be found.

I'm not sure how to get that .dll, I tried doing 'dub upgrade'
but that didn't do much.

Here's what some of my files look like:
app.d :
------------
import std.stdio;
import derelict.opengl3.gl3;
import derelict.sdl2.sdl;

void main()
{
	writeln("Edit source/app.d to start your project.");
	DerelictGL3.load();
	DerelictSDL2.load();
	DerelictGL3.reload();
}
-----------

dub.json :

-----------

{
	"name": "testbuild",
	"description": "A minimal D application.",
	"copyright": "Copyright © 2014, Kyoji",
	"authors": ["Kyoji"],
	"importPaths": ["lib/"],
	"dependencies": {
		"derelict-gl3": ">=1.0.2",
		"derelict-sdl2": ">=1.2.1",
		
	}
}

----------

I setup a lib folder from the project root, and I have the source
files for the packages under 'import'.

Is the only thing I'm missing the .dll's?

Thanks!
Jul 02 2014
next sibling parent "ponce" <contact gam3sfrommars.fr> writes:
On Thursday, 3 July 2014 at 04:46:02 UTC, K.K. wrote:
 Is the only thing I'm missing the .dll's?

 Thanks!
Yes, everything went fine, and you find the missing DLL here: https://www.libsdl.org/download-2.0.php
Jul 03 2014
prev sibling parent reply "FreeSlave" <freeslave93 gmail.com> writes:
Derelict contains bindings to other libraries, not these 
libraries themselves. dub downloads only these bindings, not 
original libraries (since they are written in C, not D, and not 
included in dub repositories). You should manually get necessary 
libraries and put them in folder where .exe will be placed or in 
some path from PATH environment variable, so application would be 
able to find them at runtime.
Jul 03 2014
parent "K.K." <trampzy yahoo.com> writes:
On Thursday, 3 July 2014 at 07:20:52 UTC, ponce wrote:
 On Thursday, 3 July 2014 at 04:46:02 UTC, K.K. wrote:
 Is the only thing I'm missing the .dll's?

 Thanks!
Yes, everything went fine, and you find the missing DLL here: https://www.libsdl.org/download-2.0.php
On Thursday, 3 July 2014 at 09:38:23 UTC, FreeSlave wrote:
 Derelict contains bindings to other libraries, not these 
 libraries themselves. dub downloads only these bindings, not 
 original libraries (since they are written in C, not D, and not 
 included in dub repositories). You should manually get 
 necessary libraries and put them in folder where .exe will be 
 placed or in some path from PATH environment variable, so 
 application would be able to find them at runtime.
Ohhhh okay. That really clears things up; thanks for the help guys!
Jul 03 2014