You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is probably Mac OS X and Clang specific but when you import your extension and you get an error like:
16
+
17
+
``ImportError: dynamic module does not define module export function (PyInit_Foo)``
18
+
19
+
Have a look at the binary.
20
+
21
+
.. code-block:: sh
22
+
23
+
$ nm -m Foo.cpython-36m-darwin.so | grep Init
24
+
00000000000010d0 (__TEXT,__text) non-external (was a private external) _PyInit_Foo
25
+
26
+
Sometimes (why?) clang does not make the symbol external. I have found that adding ``__attribute__((visibility("default")))`` to the module initialisation function can fix this:
0 commit comments