This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients eric.snow, paul.moore, sobolevn, steve.dower, tim.golden, vstinner, zach.ware
Date 2021-09-16.15:45:06
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1631807106.56.0.868112703687.issue45220@roundup.psfhosted.org>
In-reply-to
Content
> C:\Program Files (x86)\Windows Kits\10\Include\10.0.22000.0\um\winnt.h(253): error RC2188: D:\a\cpython\cpython\PCbuild\obj\311win32_Release\pythoncore\RCa05056(47) : fatal error RC1116: RC terminating after preprocessor errors [D:\a\cpython\cpython\PCbuild\pythoncore.vcxproj]

Let's split it into sub-parts:

* C:\Program Files (x86)\Windows Kits\10\Include\10.0.22000.0\um\winnt.h(253): error RC2188
* D:\a\cpython\cpython\PCbuild\obj\311win32_Release\pythoncore\RCa05056(47)
* fatal error RC1116: RC terminating after preprocessor errors
* [D:\a\cpython\cpython\PCbuild\pythoncore.vcxproj]

RCxxxx errors are generated by the resource compiler

> C:\Program Files (x86)\Windows Kits\10\Include\10.0.22000.0\um\winnt.h(253)

What is the code at line 253?

> error RC2188

What is this error?

> 311win32_Release\pythoncore\RCa05056(47)

Is this a directory with a generated name, or is it an error code?

> fatal error RC1116

What is this error?

--

Python contains the following .rc files:

PC/pylauncher.rc
PC/pyshellext.rc
PC/python_exe.rc
PC/python_nt.rc
PC/pythonw_exe.rc
PC/sqlite3.rc

None of these files include winnt.h.

In fact, "winnt.h" cannot be found in any file of the Python source code.

PC/python_nt.rc includes PC/python_ver_rc.h which contains 3 includes:

* #include "winver.h" => Windows SDK header file
* #include "modsupport.h" => Include/modsupport.h
  => it includes #include <stdarg.h>
* #include "patchlevel.h" => Include/patchlevel.h

I'm not sure why modsupport.h is included.

--

I found one page mentioning RC2188 *and* RC1116 error codes together:

https://social.msdn.microsoft.com/Forums/vstudio/en-US/7ba8eb72-12e9-4c78-af68-7f50c170040f/warning-rc4011-and-error-rc2188?forum=vclanguage

"RCxxxx errors are generated by the resource compiler. One of your .rc files includes directly or indirectly headers that RC can't understand so you'll have to check that and remove the #includes."
History
Date User Action Args
2021-09-16 15:45:06vstinnersetrecipients: + vstinner, paul.moore, tim.golden, eric.snow, zach.ware, steve.dower, sobolevn
2021-09-16 15:45:06vstinnersetmessageid: <1631807106.56.0.868112703687.issue45220@roundup.psfhosted.org>
2021-09-16 15:45:06vstinnerlinkissue45220 messages
2021-09-16 15:45:06vstinnercreate