Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

djberg96 (2603)

djberg96
  (email not shown publicly)

Journal of djberg96 (2603)

Friday December 10, 2004
03:58 PM

$CPPFLAGS for Win32

[ #22260 ]
My hardcore dive into the Win32 API has revealed something interesting. It turns out that certain functions are only available based on the value of the certain macros. So, on my XP Pro box for example, the AttachConsole() function is not available unless _WIN32_WINNT is set to 0x0501 or greater first (either in the Makefile or within the source).

This is a pain now for extension writers on Win32, and will become crucial later, when 64 bit Windows becomes more popular. We *could* all just write a simple WIN32::API script within our Makefiles to get the major and minor version of Windows and set the value accordingly. The *better* option would be to have MakeMaker automatically set this value for me so I don't have to.

I haven't checked for certain, but I don't *think* Perl's ExtUtils::MakeMaker does this (nor does Ruby's mkmf). Time to submit a patch. :)

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.