Khronos Public Bugzilla
Bug 706 - Don't define WIN32_LEAN_AND_MEAN if is already defined
Summary: Don't define WIN32_LEAN_AND_MEAN if is already defined
Alias: None
Product: OpenGL
Classification: Unclassified
Component: Man Pages, Reference Card & Other Documentation (show other bugs)
Version: 4.2
Hardware: PC Windows
: P3 enhancement
Target Milestone: ---
Assignee: Jon Leech
QA Contact:
Depends on:
Reported: 2012-08-28 14:42 PDT by breakin
Modified: 2013-07-08 03:29 PDT (History)
0 users

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description breakin 2012-08-28 14:42:16 PDT
In the version of glcorearb.h that I have there is a line

#define WIN32_LEAN_AND_MEAN 1
#include <windows.h>

Sometimes WIN32_LEAN_AND_MEAN might already be defined and windows.h already included. Then a warning is generated in Visual Studio

glcorearb.h(59): warning C4005: 'WIN32_LEAN_AND_MEAN' : macro redefinition

A suggestion would be to have the following in the header instead

#define WIN32_LEAN_AND_MEAN 1
#include <windows.h>

to suppress warning. I could disable the warning manually, but I like to keep warnings enabled.
Comment 1 Jon Leech 2013-07-08 03:29:44 PDT
This should be done in the new XML Registry-generated glcorearb.h now - thanks!