Skip to content

Commit babbd98

Browse files
authored
Windows: fewer windows.h includes from platform.h (#3596)
In particular, defining NOGDI before including <windows.h> achieves several things amongh others: - No longer causes ERROR symbol to be defined to 0. ERROR being defined prevents using e.g. google/glog library, since it wants ERROR to mean something else. - No longer defines some possibly widely used names e.g. GetObject.
1 parent afaaf6d commit babbd98

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/include/OpenImageIO/platform.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@
4848
# ifndef NOMINMAX
4949
# define NOMINMAX
5050
# endif
51+
# ifndef NOGDI
52+
# define NOGDI
53+
# endif
5154
# include <windows.h>
5255
#endif
5356

0 commit comments

Comments
 (0)