问一个libcurl的问题

系统是debian 6.0, 编译libcurl支持ssh2, ssl, idn.
ssh2, ssl, idn安装在/usr/lib,libcurl安装在/usr/local/lib下. 但是编译应用的时候总是出错,提示未定义的引用.

g++ -static -o libcurlt libcurlt.cc -lcurl -lcares -lidn -lssh2 -lssl -lcrypto -lrt -lssl -lcrypto -lz -lssh2 -ldl


(.text+0x35b): undefined reference to `gcry_md_get_algo_dlen'
/usr/lib/gcc/i486-linux-gnu/4.4.5/../../../../lib/libssh2.a(mac.o): In function `mac_method_hmac_sha1_hash':
(.text+0x370): undefined reference to `gcry_md_read'
/usr/lib/gcc/i486-linux-gnu/4.4.5/../../../../lib/libssh2.a(mac.o): In function `mac_method_hmac_sha1_hash':
(.text+0x38e): undefined reference to `gcry_md_close'
/usr/lib/gcc/i486-linux-gnu/4.4.5/../../../../lib/libssh2.a(mac.o): In function `mac_method_hmac_sha1_hash':
.....

作者: keithnwsuaf   发布时间: 2011-02-21

是不是没有包含头文件啊

作者: guomsh   发布时间: 2011-02-23