开发者

Error when importing module, dlopen(): Symbol not found

I have written a python extension开发者_运维技巧 in C (using cython, actually, though that's beside the point) which uses the AudioUnit framework in Mac OSX. The module builds correctly, but when I try to import it from the python command line, I get the following error:

ImportError: dlopen(myproject/audiomodule.so, 2): Symbol not found: _AudioUnitSetProperty
  Referenced from: /Views/python/lib/python3.1/site-packages/myproject/audiomodule.so
  Expected in: dynamic lookup

How do I tell python that it needs to use the AudioUnit framework when loading this module?


Bah, as was written in this answer regarding a similar question, the key was to pass the -framework and AudioUnit arguments as two separate tuple items. Furthermore, my platform detection was incorrect, so these flags were not being applied correctly during the build.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜