How do you get passed `LNK: cannot find python39.lib` errors when using PyD for Python to D calling?
Enjoys Math
enjoysmath at gmail.com
Mon Apr 4 22:25:53 UTC 2022
```
C:\Users\FruitfulApproach\Desktop\BananaCats\BananaCatsInD\pyd\infrastructure\pyd\make_object.d(1190): Deprecation: returning `&this` escapes a reference to parameter `this`
C:\Users\FruitfulApproach\Desktop\BananaCats\BananaCatsInD\pyd\infrastructure\pyd\make_object.d(1190): perhaps annotate the parameter with `return`
travis_fold:end:pyd_compile-24d8b1b1-b462-11ec-a868-3417eb9e56b5
library_dirs: ['C:\\Python39\\libs',
'C:\\Python39\\PCbuild\\amd64']
runtime_library_dirs: []
libraries: ['python39']
travis_fold:start:pyd_link-259ac93e-b462-11ec-ab18-3417eb9e56b5
C:\D\dmd-2.096.1\windows\bin64\dmd.exe -m64 -debug
-ofbuild\lib.win-amd64-3.9\hello_world.cp39-win_amd64.pyd
build\temp.win-amd64-3.9\Release\infra\temp.obj
-L/LIBPATH:\"C:\Python39\libs\"
-L/LIBPATH:\"C:\Python39\PCbuild\amd64\" python39.lib
build\temp.win-amd64-3.9\Release\infra\python_dll_def.def
LINK : fatal error LNK1104: cannot open file 'python39.lib'
Error: linker exited with status 1104
travis_fold:end:pyd_link-259ac93e-b462-11ec-ab18-3417eb9e56b5
error: command 'C:\\D\\dmd-2.096.1\\windows\\bin64\\dmd.exe'
failed with exit code 1
```
I'm following the instructions here:
https://pyd.readthedocs.io/en/latest/extend.html#basics
And here:
https://pyd.readthedocs.io/en/latest/dub.html
But I haven't tried making a project with dub yet. I just tried
running the env vars-setting .bat file (second link) on
`setup.py` and also my `main.py` and then running `python
setup.py install`, which produces the above error.
More information about the Digitalmars-d-learn
mailing list