Message386595
When using the limited API PyCMethod_New is not defined in python3.lib.
This leads to a link error.
This error is in 3.9 and 3.10a5
Discovered when I improved the PyCXX test suite.
Example output:
Link obj\simple.pyd
cl /nologo /W4 /LD /Zi /MT /EHsc /Zi /MT /EHsc -I. -ISrc -IC:\Python310.win64\include -D_CRT_NONSTDC_NO_DEPRECATE -U_DEBUG -DNDEBUG -DPy_LIMITED_API=0x3090000 /Feobj\simple.pyd /Fdobj\simple.pdf obj\simple.obj obj\cxxsupport.obj obj\cxx_extensions.obj obj\cxx_exceptions.obj obj\cxxextensions.obj obj\IndirectPythonInterface.obj C:\Python310.win64\libs\python3.lib
Creating library obj\simple.lib and object obj\simple.exp
simple.obj : error LNK2019: unresolved external symbol __imp_PyCMethod_New referenced in function "protected: virtual class Py::Object __cdecl Py::PythonExtension<class old_style_class>::getattr_methods(char const *)" (?getattr_methods@?$PythonExtension@Vold_style_class@@@Py@@MEAA?AVObject@2@PEBD@Z)
obj\simple.pyd : fatal error LNK1120: 1 unresolved externals
NMAKE : fatal error U1077: '"c:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\HostX64\x64\cl.EXE"' : return code '0x2'
Stop. |
|
Date |
User |
Action |
Args |
2021-02-07 18:05:58 | barry-scott | set | recipients:
+ barry-scott |
2021-02-07 18:05:58 | barry-scott | set | messageid: <1612721158.76.0.287250699598.issue43155@roundup.psfhosted.org> |
2021-02-07 18:05:58 | barry-scott | link | issue43155 messages |
2021-02-07 18:05:58 | barry-scott | create | |
|