我试图为我的 linux 共享对象编译一个 php 接口,并且我已经设法使用 swig 的输出让它编译得很好,但是当我尝试加载它时,它抱怨缺少符号:
error: undefined symbol: zend_register_long_constant
现在我看了一下zend,它似乎是一个php框架。我想我缺少一个要链接的库,但我不知道哪个库。
有其他人以前做过这个并让它工作吗?
编辑:
ldd xxxx.so
linux-gate.so.1 => (0xb7fdb000)
libcurl-gnutls.so.4 => /usr/lib/libcurl-gnutls.so.4 (0xb7f0a000)
libboost_date_time-gcc42-1_34_1.so.1.34.1 => /usr/lib/libboost_date_time-gcc42-1_34_1.so.1.34.1 (0xb7efb000)
libboost_thread-gcc42-mt-1_34_1.so.1.34.1 => /usr/lib/libboost_thread-gcc42-mt-1_34_1.so.1.34.1 (0xb7eed000)
libboost_filesystem-gcc42-1_34_1.so.1.34.1 => /usr/lib/libboost_filesystem-gcc42-1_34_1.so.1.34.1 (0xb7ee1000)
libcrypt.so.1 => /lib/tls/i686/cmov/libcrypt.so.1 (0xb7eaf000)
libresolv.so.2 => /lib/tls/i686/cmov/libresolv.so.2 (0xb7e9b000)
librt.so.1 => /lib/tls/i686/cmov/librt.so.1 (0xb7e92000)
libxml2.so.2 => /usr/lib/libxml2.so.2 (0xb7d55000)
libdl.so.2 => /lib/tls/i686/cmov/libdl.so.2 (0xb7d51000)
libnsl.so.1 => /lib/tls/i686/cmov/libnsl.so.1 (0xb7d38000)
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0xb7c49000)
libm.so.6 => /lib/tls/i686/cmov/libm.so.6 (0xb7c23000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xb7c14000)
libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xb7ab5000)
libidn.so.11 => /usr/lib/libidn.so.11 (0xb7a83000)
libldap_r-2.4.so.2 => /usr/lib/libldap_r-2.4.so.2 (0xb7a41000)
libkrb5.so.3 => /usr/lib/libkrb5.so.3 (0xb79af000)
libk5crypto.so.3 => /usr/lib/libk5crypto.so.3 (0xb798b000)
libcom_err.so.2 => /lib/libcom_err.so.2 (0xb7987000)
libgssapi_krb5.so.2 => /usr/lib/libgssapi_krb5.so.2 (0xb795c000)
libgnutls.so.26 => /usr/lib/libgnutls.so.26 (0xb78bf000)
libtasn1.so.3 => /usr/lib/libtasn1.so.3 (0xb78ad000)
libz.so.1 => /usr/lib/libz.so.1 (0xb7897000)
libgcrypt.so.11 => /lib/libgcrypt.so.11 (0xb782e000)
libpthread.so.0 => /lib/tls/i686/cmov/libpthread.so.0 (0xb7814000)
/lib/ld-linux.so.2 (0xb7fdc000)
liblber-2.4.so.2 => /usr/lib/liblber-2.4.so.2 (0xb7806000)
libsasl2.so.2 => /usr/lib/libsasl2.so.2 (0xb77ee000)
libkrb5support.so.0 => /usr/lib/libkrb5support.so.0 (0xb77e5000)
libkeyutils.so.1 => /lib/libkeyutils.so.1 (0xb77e1000)
libgpg-error.so.0 => /lib/libgpg-error.so.0 (0xb77dc000)