in reply to Re^7: Read STDOUT from Win32::Job while process is running
in thread Read STDOUT from Win32::Job while process is running

I wonder if, in this case, it wouldn't be possible to pass a -D_WIN32_WINNT=0x0500 to the compiler CCFLAGS?

Yes - that works for this case. (I didn't think of doing that.)
There are, I think, (hypothetical) situations where that approach would be found wanting - eg if the define depended upon what else is defined (#ifdef/#else/#endif), or if you need to include a header.

I can't find a ready source for that information amongst the MSC pre-defines

I can't either - it may not exist. The only way I know of is GetOSVersion().

Cheers,
Rob
  • Comment on Re^8: Read STDOUT from Win32::Job while process is running

Replies are listed 'Best First'.
Re^9: Read STDOUT from Win32::Job while process is running
by BrowserUk (Patriarch) on Mar 12, 2012 at 22:27 UTC
    I can't either - it may not exist. The only way I know of is GetOSVersion().

    That crossed my mind too, but there's no way to get at it in time for the pre-compiler stage.

    One possibility is the ver command:

    c:\test>ver Microsoft Windows [Version 6.0.6001]

    but I can't see a way to use it.


    With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.

    The start of some sanity?