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.

classification
Title: Py_UNICODE_SIZE=4 fails to link on Windows
Type: compile error Stage: resolved
Components: Build, Windows Versions: Python 2.7
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: kristof, paul.moore, steve.dower, terry.reedy, tim.golden, zach.ware
Priority: normal Keywords:

Created on 2019-01-25 10:31 by kristof, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Messages (2)
msg334348 - (view) Author: Kristof Niederholtmeyer (kristof) Date: 2019-01-25 10:31
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)
...
#endif

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

Thanks,
Kristof
msg334367 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2019-01-25 20:45
I think this falls in the category of "don't do that", because Windows does not support wide builds.  If so, this issue should be closed as 'not a bug'.  If not, some Windows expert should enlighten me.
History
Date User Action Args
2022-04-11 14:59:10adminsetgithub: 80006
2019-01-31 09:46:00methanesetstatus: open -> closed
resolution: not a bug
stage: resolved
2019-01-25 20:45:26terry.reedysetnosy: + terry.reedy
messages: + msg334367
2019-01-25 10:31:17kristofcreate