문제

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?

도움이 되었습니까?

해결책

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).

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top