Skip to content

Commit 413bbdb

Browse files
committed
Fix link: include c74_min.h first so min emits its implementation
The modern min-api emits its out-of-line statics (the wrapper message name types among them) only in the translation unit where c74_min.h is included with C74_MIN_WITH_IMPLEMENTATION — and only if c74_min_api.h hasn't already been include-guarded in first. Our runtime helper header was pulling c74_min_api.h ahead of c74_min.h, which left 34 wrapper symbols undefined at link on both platforms. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Bc9TBcdwuTopbjs5qZG2PA
1 parent da0cb27 commit 413bbdb

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

source/projects/tap.python_tilde/tap.python_tilde.h

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,16 @@
44

55
#pragma once
66

7-
#include "tap.python_tilde_runtime.h" // includes Python.h; must come before c74_min.h pulls in system headers
7+
#define PY_SSIZE_T_CLEAN
8+
#include <Python.h> // CPython insists on being included before system headers
89

10+
// c74_min.h must be the FIRST min header in the translation unit: it defines
11+
// C74_MIN_WITH_IMPLEMENTATION so the min wrapper's out-of-line statics get
12+
// emitted here. If c74_min_api.h sneaks in first (e.g. via our helper headers),
13+
// the include guards swallow those definitions and the external fails to link.
914
#include "c74_min.h"
1015

16+
#include "tap.python_tilde_runtime.h"
1117
#include "tap.python_tilde_cglue.h"
1218
#include "tap.python_tilde_attribute.h"
1319
#include "tap.python_tilde_message.h"

0 commit comments

Comments
 (0)