Derelict GLFW3 glfw3.dll error

Alexander via Digitalmars-d digitalmars-d at puremagic.com
Fri Nov 27 10:37:11 PST 2015


import std.stdio;

import derelict.opengl3.gl3;
import derelict.glfw3.glfw3;
pragma(lib, 
"C:\\Users\\Alexander\\AppData\\Roaming\\dub\\packages\\derelict-gl3-1.0.17\\lib\\DerelictGL3");
pragma(lib, 
"C:\\Users\\Alexander\\AppData\\Roaming\\dub\\packages\\derelict-glfw3-master\\lib\\DerelictGLFW3");
pragma(lib, 
"C:\\Users\\Alexander\\AppData\\Roaming\\dub\\packages\\derelict-util-2.0.4\\lib\\DerelictUtil");


int main()
{
	DerelictGL3.load();
	DerelictGLFW3.load();
     GLFWwindow* window;


     if (!glfwInit())
         return -1;


     window = glfwCreateWindow(640, 480, "Hello World", null, 
null);
     if (!window)
     {
         glfwTerminate();
         return -1;
     }

     /* Make the window's context current */
     glfwMakeContextCurrent(window);
	DerelictGL3.reload();


     while (!glfwWindowShouldClose(window))
     {



         glfwSwapBuffers(window);


         glfwPollEvents();
     }

     glfwTerminate();
     return 0;
}


When I run my program I get the error"
derelict.util.exception.SharedLibLoadException at ..\..\AppData\Roaming\dub\packages\derelict-util-2.0.4\source\derelict\util\exception.d(35): Failed to load one or more shared libraries:
	glfw3.dll - The specified module could not be found."

I am not sure how I can link the glfw3.dll to my libraries so the 
system can find the dll file. I'm using the dub manager (Through 
github) for all of my external dependencies. Any suggestions on 
what I should do to fix this problem?


More information about the Digitalmars-d mailing list