jjzjj

libreboundx

全部标签

python - 使用 distutils 的 setup.py 编译 C 共享库,当库依赖于第二个共享库时

我在OSX上,试图用distutils的setup.py在C中编译一个共享库(使用ctypes在python中使用)。我是distutils的新手,但是当我要编译的共享库(libreboundx.so)依赖于另一个共享库(librebound.so)时,我遇到了问题。明确地,在modify_orbits_direct.c中我有#include"rebound.h"rebound.h在目录/Users/dt/rebound/src/下,rebound.h中的所有函数都在/Users/dt/rebound/下的共享库librebound.so中。与cc的链接看起来像。cc-fPIC-sha