Commit 6858ca2
committed
Build ErrorExtern into the extension module
ErrorExtern.cpp defines ccsp_set_error but was only listed in the
test_c_api target, so the six other C API translation units in cspimpl
referenced an undefined symbol. ELF and Mach-O permit undefined symbols
in a shared object and resolve them lazily, so the Linux and macOS
wheels linked and only Windows failed, with LNK1120 on _cspimpl.pyd.
The module would have raised ImportError on first use everywhere.
Also define CSPIMPL_EXPORTS for test_c_api. That target compiles the C
API sources itself, so without it CSP_C_API_EXPORT expands to dllimport
for symbols the target defines locally, which MSVC reports as LNK4217
and LNK4286.
Signed-off-by: Tim Paine <3105306+timkpaine@users.noreply.github.com>1 parent 98e2266 commit 6858ca2
2 files changed
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
| 91 | + | |
91 | 92 | | |
92 | 93 | | |
93 | 94 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
29 | 32 | | |
30 | 33 | | |
31 | 34 | | |
| |||
0 commit comments