www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Derelict GLFW3 glfw3.dll error

reply Alexander <awpatapoff gmail.com> writes:
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 ..\..\AppData\Roaming\dub\packages\derelict-util-2.0.4\source\derelict\u
il\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?
Nov 27 2015
parent extrawurst <stephan extrawurst.org> writes:
On Friday, 27 November 2015 at 18:37:13 UTC, Alexander wrote:
 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");

 [...]
Did you download the glfw binaries from here: http://www.glfw.org/ and put the DLL right where dub runs the program ? --Stephan
Nov 27 2015