【发布时间】:2013-01-24 15:05:10
【问题描述】:
如何将静态库(.a) 与 libtool 链接?
我正在创建一个 apache 模块 (mod_shib_22.so),它使用三个 RSA 库 libcertc.a 、 libcertcsp.a 和 libbsafe.a
我将这些库与-lcertc -lcertcsp -lbafe 链接,但在加载模块时出现“符号未定义”错误:
./apachectl -k stop httpd: Syntax error on line 426 of /usr/local/apache2/conf/httpd.conf:
Cannot load /usr/local/lib64/shibboleth/mod_shib_22.so into server: /usr/local/lib64/shibboleth/mod_shib_22.so: undefined symbol: T_GetDynamicList
我在 Makefile 中使用这些行:
LDFLAGS = -L../../libraries/Crypto-C-6.4.0.3/lib/linux_lsb30_x86_64 -L../../libraries/Cert-C-2.9.0.0/lib/LinuxLSB30_x86_64/release_mt
LIBOBJS =
LIBS = -lxerces-c -L/usr/local/lib64 -llog4shib -lnsl -lcertc -lcertcsp -lbsafe -ldl
【问题讨论】:
-
其他库正在链接,因为它们是共享的。
标签: c++ linux static-libraries libtool