clojurelwjgl

Unable to match glfwCreateWindow


I'm trying to follow this tutorial and can't seem to correctly translate this line:

window = glfwCreateWindow(300, 300, "Hello World!", NULL, NULL);

This is what I've tried:

(let [window (GLFW/glfwCreateWindow (int 400) (int 300) "LWJGL" nil nil)]

Which produces the following error:

Syntax error (IllegalArgumentException) compiling . at (lwjgl_intro/core.clj:13:16).
No matching method glfwCreateWindoww found taking 5 args for class org.lwjgl.glfw.GLFW

Here is the source for GLFW (LWJGL's wrapper, that is)

My complete source is here.


Solution

  • erdos comment brought me on the right track. I did indeed confuse null with NULL.

    null is a Java keyword, whereas NULL is a macro in C/C++.

    However, LWJGL has defined NULL in org.lwjgl.system.MemoryUtil:

    public static final long NULL = 0L;