-
Kirill Smelkov authored
Libpyxruntime by definition contains python-specific code and we already compile it with include path having python includes in it. However on windows pyconfig.h contains #pragma comment(lib,"python3.lib") which instructs the linker to automatically link to that library. And without proper library path the link fails: Z:\home\kirr\src\tools\go\pygo-win\BuildTools\vc\tools\msvc\14.35.32215\bin\Hostx64\x64\link.exe /nologo /INCREMENTAL:NO /LTCG /DLL /MANIFEST:EMBED,ID=2 /MANIFESTUAC:NO /LIBPATH:build\lib.win-amd64-cpython-31 0\golang\runtime /LIBPATH:z:\home\kirr\src\tools\go\pygo-win\BuildTools\vc\tools\msvc\14.35.32215\lib\x64 /LIBPATH:z:\home\kirr\src\tools\go\pygo-win\BuildTools\kits\10\lib\10.0.22000.0\ucrt\x64 /LIBPATH:z:\h ome\kirr\src\tools\go\pygo-win\BuildTools\kits\10\lib\10.0.22000.0\um\x64 libgolang.lib build\temp.win-amd64-cpython-310\Release\golang/runtime/libpyxruntime.obj /OUT:build\lib.win-amd64-cpython-310\golang\ru ntime\libpyxruntime.dll /IMPLIB:build\lib.win-amd64-cpython-310\golang\runtime\libpyxruntime.lib LINK : fatal error LNK1104: cannot open file 'python310.lib' -> Fix it by providing proper library path for python.dll . We need to do it ourselves only for libpyxruntime dso because for py extensions this is automatically done by distutils out of the box.
fbed01b0