This is strange, I have old programs I built with MinGW-32 who required a flag 
such as "-DWIN_VER=0x400", but I can't find any WIN_VER in the header files, 
was this macro droped away? 

----- Mail original -----

De: "lh_mouse" <[email protected]> 
À: "Msys2" <[email protected]> 
Envoyé: Lundi 11 Avril 2016 05:06:05 
Objet: Re: [Msys2-users] Windows version define: why so low, or what is the 
recommendation? 

Read the following article on MSDN about _WIN32_WINNT: 
https://msdn.microsoft.com/en-us/library/windows/desktop/aa383745(v=vs.85).aspx#setting_winver_or__win32_winnt
 

A specific version of Windows SDK from Microsoft has _WIN32_WINNT defined as 
the highest version number that that SDK supports if it is not defined by the 
user. 
For example, if you have Windows SDK v7.1 (for Windows Server 2008) and do not 
define _WIN32_WINNT, the headers will act as if you defined it as 0x0601. 

The mingw-w64 version, IIRC, has _WIN32_WINNT defined as _WIN32_WINNT_WS03 
(that is, 0x0502) by default. But their headers do support a lot of new 
functions since Vista. 
The reason why they chose Windows Server 2003 as the default target might be 
that they didn't want to drop XP support. 
And according to the MSDN article above, defining _WIN32_WINNT as 0x0501 would 
drop some contents that have been added since XP SP1. 

The solution is simple: having your CPPFLAGS include '-D_WIN32_WINNT=0x0600' 
would do the trick. 
Double note, it is 'CPPFLAGS' that should include C Pre-Processor options. 

------------------ 
Best regards, 
lh_mouse 
2016-04-11 

------------------------------------------------------------- 
发件人:Mario Emmenlauer <[email protected]> 
发送日期:2016-04-11 05:17 
收件人:msys2-users 
抄送: 
主题:[Msys2-users] Windows version define: why so low, 
or what is the recommendation? 


Dear All, 

I've run into an issue twice in the last days, so I wanted to kindly ask 
for your input. Two packages I want to use are gRPC (the Google cross 
platform RPC library) and boost::filesystem, and both require _WIN32_WINNT 
to be defined to at least 0x0600. boost::filesystem seems to support sym- 
links only when _WIN32_WINNT is defined to at least 0x0600. I did not delve 
deeply into this, but that was my take from the following report, and I've 
been plagued by the same issue: 
http://stackoverflow.com/questions/19471266/boostfilesystemcreate-symlink-not-supported
 


Is _WIN32_WINNT defined by default? If yes, by whom (MSYS2, or MinGW64 gcc)? 
If its not defined by default, should packages set it via CFLAGS, or is there 
a good policy how I can compile for a specific Windows version (Vista / newer)? 
Would it maybe make sense to set 0x0600 (Vista) as a default, in order to 
enable "modern" things like symlinks? Or are there still XP users left? :-) 

Cheers, 

Mario 




------------------------------------------------------------------------------ 
Find and fix application performance issues faster with Applications Manager 
Applications Manager provides deep performance insights into multiple tiers of 
your business applications. It resolves application problems quickly and 
reduces your MTTR. Get your free trial! http://pubads.g.doubleclick.net/ 
gampad/clk?id=1444514301&iu=/ca-pub-7940484522588532 
_______________________________________________ 
Msys2-users mailing list 
[email protected] 
https://lists.sourceforge.net/lists/listinfo/msys2-users 



------------------------------------------------------------------------------ 
Find and fix application performance issues faster with Applications Manager 
Applications Manager provides deep performance insights into multiple tiers of 
your business applications. It resolves application problems quickly and 
reduces your MTTR. Get your free trial! http://pubads.g.doubleclick.net/ 
gampad/clk?id=1444514301&iu=/ca-pub-7940484522588532 
_______________________________________________ 
Msys2-users mailing list 
[email protected] 
https://lists.sourceforge.net/lists/listinfo/msys2-users 

------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial! http://pubads.g.doubleclick.net/
gampad/clk?id=1444514301&iu=/ca-pub-7940484522588532
_______________________________________________
Msys2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/msys2-users

Reply via email to