Menu

#199 Missing MONITOR_DEFAULTTONEAREST

open
nobody
None
5
2013-07-01
2013-07-01
Gisle Vanem
No

Building with MingW (using "MSYS Makefile"), gives an error at:

g:/MingW32/src/Graphics/freeglut/src/mswin/fg_main_mswin.c:1632:46: error: 'MONITOR_DEFAULTTONEAREST
' undeclared (first use in this function)

This is because <winuser.h> needs '_WIN32_WINNT >= 0x0501' for this to be defined.
A small patch:

--- SVN-Latest\CMakeLists.txt 2013-07-01 11:34:14 +0000
+++ CMakeLists.txt 2013-07-01 11:56:26 +0000
@@ -211,6 +211,7 @@
IF(WIN32)
# hide insecure CRT warnings, common practice
ADD_DEFINITIONS(-D_CRT_SECURE_NO_WARNINGS)
+ ADD_DEFINITIONS(-D_WIN32_WINNT=0x501)
IF(MSVC)
SET( CMAKE_DEBUG_POSTFIX "d" )
ENDIF(MSVC)

Discussion


Log in to post a comment.