Question

I'm working on a very simple GLFW project. I find that I need both <GL/glfw.h> and <GL/glfw3.h> headers to be able to use certain things. When I include both of these headers together, I'm getting an error:

error: conflicting declaration 'typedef void (*GLFWwindowsizefun)(GLFWwindow*, int, int)'

And it points to the glfw3.h source code where there is that exact typedef as above.

Has anyone ever experienced this? How would I go about fixing it?

Was it helpful?

Solution

Why do you think you need both glfw.h and glfw3.h? You certainly don't. Those headers are for different versions of the glfw library. Use the header for the library version you want to use (and the one you link).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top