Skip to content

Conversation

@vstinner
Copy link
Member

@vstinnervstinner commented Oct 17, 2023

Define Py_BUILD_CORE to not attempt to link the extension to python3.lib (which fails).

@vstinner
Copy link
MemberAuthor

Extract of PC/pyconfig.h:

# if defined(_DEBUG) # pragma comment(lib,"python313_d.lib") # elif defined(Py_LIMITED_API) # pragma comment(lib,"python3.lib") # else# pragma comment(lib,"python313.lib") # endif/* _DEBUG */

In debug mode, extensions are always linked to python313_d.lib. But in release mode, extensions are linked to python3.lib if Py_LIMITED_API is defined.

Define Py_BUILD_CORE to not attempt to link the extension to python3.lib (which fails).
@vstinnervstinner merged commit 2ba6f68 into python:mainOct 17, 2023
@vstinnervstinner deleted the ctypes_test_core branch October 17, 2023 21:45
aisk pushed a commit to aisk/cpython that referenced this pull request Feb 11, 2024
…thon#111005) Define Py_BUILD_CORE to not attempt to link the extension to python3.lib (which fails).
Glyphack pushed a commit to Glyphack/cpython that referenced this pull request Sep 2, 2024
…thon#111005) Define Py_BUILD_CORE to not attempt to link the extension to python3.lib (which fails).
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@vstinner