阅读:3032回复:0
求助:编译问题
系统装了ucd-snmp-4.2.3,利用它的API编了个简单的程序,从agent取系统描述。
使用下面的命令编译: gcc -g -I/usr/local/include -o snmpapp snmpapp.c -L/usr/local/lib -lsnmp 系统提示错误信息如下: /usr/local/lib/libsnmp.a(keytools.o): In function `generate_Ku\': /usr/local/ucd-snmp/snmplib/keytools.c:124: undefined reference to `EVP_md5\' /usr/local/ucd-snmp/snmplib/keytools.c:126: undefined reference to `EVP_sha1\' /usr/local/ucd-snmp/snmplib/keytools.c:126: undefined reference to `EVP_DigestInit\' /usr/local/ucd-snmp/snmplib/keytools.c:141: undefined reference to `EVP_DigestUpdate\' /usr/local/ucd-snmp/snmplib/keytools.c:153: undefined reference to `EVP_DigestFinal\' /usr/local/lib/libsnmp.a(scapi.o): In function `sc_random\': /usr/local/ucd-snmp/snmplib/scapi.c:150: undefined reference to `RAND_bytes\' /usr/local/lib/libsnmp.a(scapi.o): In function `sc_generate_keyed_hash\': /usr/local/ucd-snmp/snmplib/scapi.c:255: undefined reference to `EVP_md5\' /usr/local/ucd-snmp/snmplib/scapi.c:258: undefined reference to `EVP_sha1\' /usr/local/ucd-snmp/snmplib/scapi.c:258: undefined reference to `HMAC\' /usr/local/lib/libsnmp.a(scapi.o): In function `sc_hash\': /usr/local/ucd-snmp/snmplib/scapi.c:345: undefined reference to `EVP_md5\' /usr/local/ucd-snmp/snmplib/scapi.c:348: undefined reference to `EVP_sha1\' /usr/local/ucd-snmp/snmplib/scapi.c:348: undefined reference to `EVP_DigestInit\' /usr/local/ucd-snmp/snmplib/scapi.c:353: undefined reference to `EVP_DigestUpdate\' /usr/local/ucd-snmp/snmplib/scapi.c:354: undefined reference to `EVP_DigestFinal\' /usr/local/lib/libsnmp.a(scapi.o): In function `sc_encrypt\': /usr/local/ucd-snmp/snmplib/scapi.c:592: undefined reference to `des_key_sched\' /usr/local/ucd-snmp/snmplib/scapi.c:596: undefined reference to `des_ncbc_encrypt\' /usr/local/ucd-snmp/snmplib/scapi.c:600: undefined reference to `des_ncbc_encrypt\' /usr/local/lib/libsnmp.a(scapi.o): In function `sc_decrypt\': /usr/local/ucd-snmp/snmplib/scapi.c:715: undefined reference to `des_key_sched\' /usr/local/ucd-snmp/snmplib/scapi.c:718: undefined reference to `des_cbc_encrypt\' collect2: ld returned 1 exit status 是什么问题?? |
|