How to load a derelict program in D?

Jeroen Bollen jbinero at gmail.com
Fri Dec 6 11:50:50 PST 2013


I am using the derelict-sfml2 package in my code. My code:

import std.stdio;
import derelict.sfml2.window;

void main()
{
	DerelictSFML2Window.load();
	sfVideoMode videoMode = sfVideoMode(1280, 720);
	sfWindow* window = sfWindow_create(videoMode, "Animation", 
sfNone, null);
}

For some reason this always crashes inside a "void load( string 
libNames )" function. The crash seems to happen inside the 
'DerelictSFML2Window.load();'.

Why is that? I am using Visual Studio 2013, with the VisualD 
add-on. I have created the solution using "dub generate visuald"; 
this is my project.json:


{
	"name": "testing",
	"description": "testing",
	"authors": ["Jeroen Bollen"],
	"dependencies": {
		"derelict-sfml2" : "~master",
	}
}


More information about the Digitalmars-d-learn mailing list