0

In GL/glcorearb.h, the following comment can be found.

Do not #include both GL/glcorearb.h and either of GL/gl.h or GL/glext.h in the same source file.

However, this is the only way I can get my code to work. I have in display.h a declaration of wglCreateContextAttribsARB. This requires GL/wglext.h. However, GL/wglext.h gets undefined errors unless GL/glcorearb.h or GL/gl.h is included.

What is the problem here? Does 'source file' perhaps only refer to the .cpp (which worked fine anyway)?

A. Voll
  • 63
  • 5
  • 1
    _"Does 'source file' perhaps only refer to the .cpp"_ It's bad wording, but it intends to mean a translation unit, so a source file and (recursively) everything it includes. Did you forget to link a library? – Lightness Races in Orbit Dec 23 '15 at 10:28
  • Ah sorry, I missed your comment, but I've now answered the question. Thanks for the clarification though. I'm now including gl.h, and window.h to make gl.h work. – A. Voll Dec 23 '15 at 10:39

1 Answers1

1

It appears I overlooked a simple fact. It doesn't say GL/glext.h cannot be included with GL/gl.h.

A. Voll
  • 63
  • 5