Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
BlueLeopard543's avatar
BlueLeopard543
Honored Guest
9 years ago

capi_gle_gl.h Error C1189: #error : gl.h should be included after this, not before

I'm using the Oculus SDK with an already existing application template, which already includes gl.h in the stdafx.h before anything else, so I got an error within capi_gle_gl.h.

If I try to include capi_gle_gl.h in stdafx.h before the includes that includes gl.h I got many errors, probably because it defines some stuff that must be defined by the includes in stdafx.h.

What can I do to solve this problem? Do you have any suggestion on what should I do?

Thanks

2 Replies

  • Anyone can help me? I think that I'm not the only one who got this problem during development with OpenGL and Oculus...
  • Ktof's avatar
    Ktof
    Honored Guest

    I have the same issue: OpenGL function addresses are 'converted' into function in both files. Because the developers must have known the issue, there is a #define statement in both files that prevents the other of being included before... If you remove the define, compiler should complain about duplicate definition.

    I have not been able to find a solution to have both glfw/glew (own code) working with the CAPI_GLE_GL (required for the rift): it would be a strong point for Oculus, since that would allow to develop much much easier on non-Rift enabled machines for testing! (creating a regular standard glfw window on top of your own code)

    Anybody has found a solution?