Building importing/linking a Derelict3 project using dub in D2
I am trying to build a D2/Derelict3 example:
import std.stdio;
import derelict.opengl3.gl3;
import derelict.glfw3.glfw3;
void main(string[] args)
{
DerelictGL3.load();
DerelictGLFW3.load();
if (!glfwInit()) throw new Exception("Failed to initialize GLFW");
GLFWwindow* window = glfwCreateWindow(800, 600, "Hello DerelictGLFW3",
null, null);
if (!window) throw new Exception("Window failed to create");
while (!glfwWindowShouldClose(window))
{
glfwPollEvents();
}
glfwTerminate();
}
but I get the following error:
app.d(0,0): Error: module gl is in file 'derelict\opengl3\gl.d' which
cannot be read (d2derelict)
I have built Derelict3 using the guide on the Derelict github page, and
init'ed a folder with dub.
How do I configure dub to include the libraries in my project?
No comments:
Post a Comment