#15 minor OpenGL problem

closed
nobody
5
2009-10-03
2009-10-02
Anonymous
No

When I try to compile OpenGL code I get a bunch of errors while including GL/gl.h - fixed' it by adding the line "#include <windows.h>" to gl.h. Don't know if this is a good idea, though. It seems this is what the mingw32 version of gl.h does...

Thanks!

Discussion

  • Ozkan Sezer

    Ozkan Sezer - 2009-10-03

    As far as I know, the *.c or *.cpp code must include <windows.h> before <GL/gl.h> when compiling for windows and the header need not do it for you automatically.

     
  • Kai Tietz

    Kai Tietz - 2009-10-03

    I agree here to sezero, that normally windows.h should be included by user-code before any use of other platform headers. But in this case we can think about to add windows.h file here, as I don't see here any bad side-effects. What do you think Ozkan?

     
  • Ozkan Sezer

    Ozkan Sezer - 2009-10-03

    IMO, we should not add that to GL.h. We have enough workarounds for user bugs like SOCKET, which we should revert, we should not add more.

     
  • Kai Tietz

    Kai Tietz - 2009-10-03

    Ok, so add to source before including gl.h the include of windows.h

    Cheers,
    Kai

     
  • Kai Tietz

    Kai Tietz - 2009-10-03
    • status: open --> closed
     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks