| Summary: | As of Visual Studio 2015 U3 the macro _USING_V110_SDK71_ is no longer reliable | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Zsar <lordzsar1> |
| Component: | build | Assignee: | Sam Lantinga <slouken> |
| Status: | RESOLVED WONTFIX | QA Contact: | Sam Lantinga <slouken> |
| Severity: | minor | ||
| Priority: | P2 | CC: | chli.hug, icculus, philipp.wiesemann |
| Version: | 2.0.4 | Keywords: | target-2.0.6 |
| Hardware: | x86_64 | ||
| OS: | Windows 7 | ||
| See Also: |
https://bugzilla.libsdl.org/show_bug.cgi?id=2451 https://bugzilla.libsdl.org/show_bug.cgi?id=2466 |
||
| Attachments: | Patch that adds a check for __has_include. | ||
|
Description
Zsar
2016-07-07 15:56:42 UTC
Could we just check the _MSC_VER macro and not include this if we're on VS2015 or later? (and is the header gone because this is just part of windows.h now or something?) --ryan. I installed Visual Studio 2015 and switched a project to use the 140_xp toolset, and it did automatically define _USING_V110_SDK71_ in my project settings. I'm guessing this is a bug in the Visual Studio update process, where sometimes that doesn't get set? If you remove your own definition and then change the toolset to a few different values, does it get set again when you set it back to 140_xp? This is partially fixed in this commit: https://hg.libsdl.org/SDL/rev/3ed56acc90ca This only works for Visual Studio 2017 and newer, unfortunately. Since you have a workaround and I don't see a way to fix this for Visual Studio 2015, I'm going to mark this bug as WONTFIX. Created attachment 2916 [details]
Patch that adds a check for __has_include.
Sam, I think __has_include is only available with _MSC_VER>=1911.
The compiler version from the first Visual Studio 2017 (19.10.25017) doesn't have it.
I updated to the recently released 15.3 (19.11.25506) and there it is defined.
Can't say anything about 15.1 and 15.2.
An additional defined(__has_include) check can fix it.
Fixed, thanks! https://hg.libsdl.org/SDL/rev/71610a71bbb2 |