Subject: | [XS] - Included File Ordering Issue |
Date: | Wed, 22 Jan 2014 13:01:42 -0800 |
To: | bug-Win32-Console-ANSI [...] rt.cpan.org |
From: | J Mash <jmash01 [...] gmail.com> |
Currently, the 'perl.h' file is being included before the 'windows.h' file,
which may cause this module to fail to build for some older versions of
perl.
The issue is that the 'perl.h' file is including the 'win32.h' file (in the
same directory), which causes _WIN32_WINNT to be defined to a default value
before any of the windows headers have had a chance to define it properly
based on the OS/SDK setup. This ultimately causes WINVER to be defined
incorrectly (on some older perls), and that is what is used to determine if
MIIM_BITMAP needs to be defined.
In this case, perl 5.10.1 defaults the _WIN32_WINNT to 0x0400, and 0x0500
is required to set up the define for MIIM_BITMAP, so it results in the
'Your SDK is too old." message when trying to build the module.
As a test, I just moved the '#include <windows.h>' line directly under
'#define PERL_NO_GET_CONTEXT', and the module built, tested, and installed
successfully.