Can someone explain how glfw3.dll gets created?
John Colvin via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Mon Oct 13 13:31:05 PDT 2014
On Monday, 13 October 2014 at 20:21:56 UTC, WhatMeWorry wrote:
> I have a simple GLFW3 program running in Visual D integrated
> shell, that kept aborting at DerelictFLFW3.load() with a
> "failed to load the shared libraries: glfw3.dll.'
>
> So I found a glfw3.dll somewhere and moved it into the project
> folder (I know this is bad technique) and that fixed the
> problem.
>
> But now I'm wondering were this glfw3.dll came from.
>
> I rebuildt the DerelictGLFW3 with dub as per the instructions.
>
> E:\DerelictGLFW3-master>dub build
> Building derelict-glfw3 ~master configuration "library", build
> type debug.
> Running dmd...
>
> And I see
> E:\DerelictGLFW3-master\source\derelict\glfw3\glfw3.d which is
> used for compile time.
>
> And the
> E:\DerelictGLFW3-master\lib\DerelictGLFW3.lib which is the
> static library required at link time.
>
> But I couldn't find any glfw3.dll under the
> E:\DerelictGLFW3-master path.
>
>
> I did however, find these lines in the DerelictGLFW3/glfw3.d
> code:
> ...
> static if( Derelict_OS_Windows )
> enum libNames = "glfw3.dll";
> . . .
> class DerelictGLFW3Loader : SharedLibLoader {
> public this() {
> super( libNames );
> }
>
> protected override void loadSymbols() {
> bindFunc( cast( void** )&glfwInit, "glfwInit" );
> bindFunc( cast( void** )&glfwTerminate, "glfwTerminate"
> );
> bindFunc( cast( void** )&glfwGetVersion,
> "glfwGetVersion" );
> bindFunc( cast( void** )&glfwGetVersionString,
> "glfwGetVersionString" );
> bindFunc( cast( void** )&glfwSetErrorCallback,
> "glfwSetErrorCallback" );
> ...
>
> But I don't believe this will create the glfw3.dll file? If
> I'm correct, how, when and where is glfw3.dll created.
>
> thanks as always.
Derelict-glfw3 is just d bindings and a loader for the glfw3
library. The actual implementation of glfw (i.e. what you would
find in glfw3.dll) is a separate project, which you can find the
source for here http://www.glfw.org
More information about the Digitalmars-d-learn
mailing list