How to load a derelict program in D?

Mike Parker aldacron at gmail.com
Fri Dec 6 21:08:03 PST 2013


On Friday, 6 December 2013 at 19:50:52 UTC, Jeroen Bollen wrote:
> 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();'.
>

Is it crashing or are you getting an exception? If the CSFML DLLs 
are not on your system path, then you'll get exceptions when 
trying to load them. Make sure the DLLs are in the app's working 
directory when you run it.

Also, for Derelict-specific issues, it's probably better to post 
to the Derelict forums[1] rather than here.

[1] http://dblog.aldacron.net/forum/index.php


More information about the Digitalmars-d-learn mailing list