Skip to content

Commit 0f2004c

Browse files
committed
get it building with array/classes stuff (although not calling it)
1 parent 66d8b83 commit 0f2004c

File tree

10 files changed

+138
-4279
lines changed

10 files changed

+138
-4279
lines changed

NOTES.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,17 @@ If its cpp files, you need to pass swig_opts=['-c++'] as a kwarg to the Extensio
1818

1919
Note also that language='c++' wasn't necessary as a kwarg to the extension
2020

21+
22+
If you want to define stuff in a .c file, you *HAVE* to extern "C" the header or you'll get something like:
23+
24+
Traceback (most recent call last):
25+
File "test_example.py", line 4, in <module>
26+
import example
27+
File "/Users/davis/Desktop/swig_scratch/pyWrapper/example.py", line 26, in <module>
28+
_example = swig_import_helper()
29+
File "/Users/davis/Desktop/swig_scratch/pyWrapper/example.py", line 22, in swig_import_helper
30+
_mod = imp.load_module('_example', fp, pathname, description)
31+
ImportError: dlopen(/Users/davis/Desktop/swig_scratch/pyWrapper/_example.so, 2): Symbol not found: __Z9util_funcv
32+
Referenced from: /Users/davis/Desktop/swig_scratch/pyWrapper/_example.so
33+
Expected in: dynamic lookup
34+

example.i

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
%{
44
#define SWIG_FILE_WITH_INIT
55
#include "src/include/public_interface.hpp"
6-
// #include "src/utils/util.h"
7-
#include "src/impl/util.h"
86
%}
97

108
%include "numpy.i"

0 commit comments

Comments
 (0)