python3.lib
only contains key library functions used by cpython program (or C extension for Python). python3x.lib
(such as python38.lib
, python39.lib
) contains the full library functions. You should link to python3.lib
so that your build configuration is not affected by minor Python version upgrade such as from 3.8 to 3.9.
The linking is very platform and compiler dependent. See code comment in the PC/pyconfig.h
(See reference [3]).
Additional info
- PEP384 - Linkage
- Stackoverflow question on how MSVC linker looks for specific Python debug library
- PC/pyconfig.h
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…