在vs2017中需要加上_USING_V110_SDK71_,强制指定SDK的版本。
perl Configure VC-WIN32 –prefix=H:\VC_INCLUDE\OpenSSL-Win32_MSVC141_xp -D_WIN32_WINNT=0x0501 -D_USING_V110_SDK71_
在VS2013中
perl Configure VC-WIN32 –prefix=H:\VC_INCLUDE\OpenSSL-Win32_MSVC141_xp -D_WIN32_WINNT=0x0501
这不是它的工作方式。 回到VS2012,您使用了Project + Properties,General,Platform Toolset设置并选择了v110_xp 。 这进行了几次设置更改。 作为副作用 ,您还可以定义_USING_V110_SDK71_宏。 这是准确的,其中一个设置更改是您将使用SDK版本7.1标头和库而不是版本8. 7.1是最后一个仍与XP兼容的SDK版本。
这对任何事情都不重要,到目前为止,您获得的最重要的变化是链接器的系统,最低要求版本设置。 使用v110_xp可确保将此设置更改为XP版本号5.01。 没有它你的目标6.00,Vista版本号。 这是一个非常重要的设置,当您告诉它您设计的程序在最新的Windows版本上运行良好时,Windows会关注它并关闭几个appcompat垫片。
在VS2013中它仍然可以正常工作。 选择v120_xp工具集。
That's not the way it worked. Back in VS2012, you used the Project + Properties, General, Platform Toolset setting and selected v110_xp. Which made several setting changes. As a side-effect, you'd also get the _USING_V110_SDK71_ macro defined. Which is accurate, one of the setting changes is that you'll use the SDK version 7.1 headers and libraries instead of version 8. 7.1 is the last SDK version that's still compatible with XP.
Which isn't actually important for anything, by far the most important change that you got was the linker's System, Minimum Required Version setting. Using v110_xp ensured that this setting was changed to 5.01, the XP version number. Without it you target 6.00, the Vista version number. It is a very important setting, Windows pays attention to it and turns off several appcompat shims when you tell it that you designed your program to run well on the latest Windows versions.
It still works the same in VS2013. Select the v120_xp toolset.