質問するログイン新規登録

質問編集履歴

3

環境の括弧の位置が紛らわしいので変更

2018/11/26 15:20

投稿

tpywao
tpywao

スコア12

title CHANGED
File without changes
body CHANGED
@@ -7,10 +7,10 @@
7
7
  括弧()の中はインストール方法です。
8
8
 
9
9
  macOSX: 10.14.1
10
- Python: 3.6.1(pyenv)
10
+ Python(pyenv): 3.6.1
11
- pyenv: stable 1.2.8(brew)
11
+ pyenv(brew): stable 1.2.8
12
12
  g++: Apple LLVM version 10.0.0 (clang-1000.10.44.4)
13
- swig: stable 3.0.12(brew)
13
+ swig(brew): stable 3.0.12
14
14
 
15
15
  ### やったこと
16
16
  ```

2

自分と同じように困っている、誰かの検索に引っかかるようにエラー内容の一部を記載。

2018/11/26 15:20

投稿

tpywao
tpywao

スコア12

title CHANGED
File without changes
body CHANGED
@@ -25,7 +25,8 @@
25
25
  $ g++ -O2 -fPIC -c example_wrap.cxx $(python-config --includes)
26
26
  $ g++ -shared example_wrap.o example.o -o _example.so
27
27
  ```
28
- ここまで実行すると、以下のエラーが発生してしまいました。
28
+ ここまで実行すると、`Undefined symbols for architecture x86_64`というようなエラーが発生してしまいました。
29
+ 以下に全文を記載します。
29
30
  [エラー内容(gist)](https://gist.github.com/tpywao/d701cec1679b85f33c1017265ef3b857)
30
31
 
31
32
  よろしくお願いします。

1

11/26更新(やったことに書き忘れていたswigコマンドとexample.oのコンパイルを追記)

2018/11/26 11:02

投稿

tpywao
tpywao

スコア12

title CHANGED
File without changes
body CHANGED
@@ -20,8 +20,9 @@
20
20
  $ ./configure
21
21
  $ make
22
22
  $ cd Examples/python/class
23
+ $ swig -python -c++ example.i
24
+ $ g++ -O2 -fPIC -c example.cxx
23
25
  $ g++ -O2 -fPIC -c example_wrap.cxx $(python-config --includes)
24
- ## この時点で既にexample.oは出来ています。
25
26
  $ g++ -shared example_wrap.o example.o -o _example.so
26
27
  ```
27
28
  ここまで実行すると、以下のエラーが発生してしまいました。