Skip to content

_nanosvg.obj : error LNK2001: unresolved external symbol _PyGen_Send reported when building wxPython on Python 3.10 #2016

@zosun

Description

@zosun

OS: Windows 10 64bits

I am trying to install wxPython for Python 3.10.

MSVC build tool v14

Operating system:
Python 3.10 64 bit
wxPython 4.1.1

Creating library build/wxsvg\temp.win-amd64-3.10\Release\wx/svg_nanosvg.cp310-win_amd64.lib and object build/wxsvg\temp.win-amd64-3.10\Release\wx/svg_nanosvg.cp310-win_amd64.exp
_nanosvg.obj : error LNK2001: unresolved external symbol _PyGen_Send
build\wxsvg\lib.win-amd64-3.10\wx\svg_nanosvg.cp310-win_amd64.pyd : fatal error LNK1120: 1 unresolved externals
error: command 'C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\link.exe' failed with exit code 1120
Command 'C:\Python3.10\python.exe setup-wxsvg.py build_ext --inplace' failed with exit code 1.

after searching the wxPython code:

wx/svg/_nanosvg.c:20946: ret = _PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value);
wx/svg/_nanosvg.c:20951: ret = _PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value);
wx/svg/_nanosvg.c:21035: ret = _PyGen_Send((PyGenObject*)yf, NULL);

According to Python forum, the _PyGen_Send is replaced by PyIter_Send().

Maybe wxPython should check Python version to determine which function is called, PyIter_Send or PyGen_Send()

Thanks/Gavin

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions