关于“ --enable-shared” Python的困惑

时间:2018-10-18 10:04:31

标签: compilation dynamic-linking

我有这种相当混乱的情况。当我在Linux上检查动态共享Python时,会看到以下信息:

/some/path/python2.7/lib/python2.7/lib-dynload ldd _ctypes.so 
    (bunch of other libs)
    libpython2.7.so.1.0 => /some/lib/path/libpython2.7.so.1.0 (0x00007f1e7b24a000)
    (bunch of other libs)

但是当我在OSX上执行类似的操作时,在使用--enable-shared标志构建的Python上,我只能看到以下内容:

otool -L _ctypes.so
_ctypes.so:
    /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1252.50.4)

我没有在其中看到libpython2.7链接。我想念国旗吗? libpython2.7.dylib文件肯定在那里。

0 个答案:

没有答案