[New-bugs-announce] [issue35825] Py_UNICODE_SIZE=4 fails to link on Windows

Kristof Niederholtmeyer report at bugs.python.org
Fri Jan 25 05:31:17 EST 2019

New submission from Kristof Niederholtmeyer <kristof.niederholtmeyer at synopsys.com>:

When I change Py_UNICODE_SIZE from 2 (default) to 4 in PC/pyconfig.h, msvc-14 gives the following error:
  _winreg.obj : error LNK2001: unresolved external symbol PyUnicode_DecodeMBCS [e:\kristof\SDR\sdrsandbox\w64\msvc140\Python-2.7.15\PCbuild\pythoncore.vcxproj]
  e:\kristof\SDR\sdrsandbox\w64\msvc140\Python-2.7.15\PCBuild\\amd64\python27_snps_vp.dll : fatal error LNK1120: 1 unresolved externals [e:\kristof\SDR\sdrsandbox\w64\msvc140\Python-2.7.15\PCbuild\pythoncore.vcxproj]

The problem appears to be that the missing function gets disabled in unicodeobject.c with
#if defined(MS_WINDOWS) && defined(HAVE_USABLE_WCHAR_T)

while _winreg.c does not check the availability of this function.


components: Build, Windows
messages: 334348
nosy: kristof, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Py_UNICODE_SIZE=4 fails to link on Windows
type: compile error
versions: Python 2.7

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list