digitalmars.D.learn - Derelict GLFW3 glfw3.dll error
- Alexander (40/40) Nov 27 2015 import std.stdio;
- Mike Parker (6/11) Nov 27 2015 No, none of the Derelict packages have a link-time dependency the
- Mike Parker (4/14) Nov 27 2015 I should also point out that if you're using DUB to build your
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");
pragma(lib,"lb");
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;
}
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."
Is there a way for me to link the glfw.dll so that derelictUtil
can find the dll? Or am I going about this wrong?
Nov 27 2015
On Friday, 27 November 2015 at 22:58:20 UTC, Alexander wrote: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." Is there a way for me to link the glfw.dll so that derelictUtil can find the dll? Or am I going about this wrong?No, none of the Derelict packages have a link-time dependency the libraries they bind. It's purely a runtime dependency. You need to make sure that the DLL is somewhere it can be found. GLFW3 is not a system library, so that generally means you need to make sure it is in the same directory as your executable.
Nov 27 2015
On Friday, 27 November 2015 at 22:58:20 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"); pragma(lib,"lb");I should also point out that if you're using DUB to build your project, you do not need these pragmas. DUB will manage all of this for you.
Nov 27 2015









Mike Parker <aldacron gmail.com> 