当前位置: 技术问答>linux和unix
Linux7.2下Gcc编译的问题
来源: 互联网 发布时间:2015-01-11
本文导语: #gcc -g -I/usr/include -o snmpapp snmpapp.c -L/usr/lib -lsnmp /usr/lib/libsnmp.so: undefined reference to `EVP_DigestInit' /usr/lib/libsnmp.so: undefined reference to `EVP_DigestFinal' /usr/lib/libsnmp.so: undefined reference to `EVP_md5' /usr/lib/libsnmp.so: undef...
#gcc -g -I/usr/include -o snmpapp snmpapp.c -L/usr/lib -lsnmp
/usr/lib/libsnmp.so: undefined reference to `EVP_DigestInit'
/usr/lib/libsnmp.so: undefined reference to `EVP_DigestFinal'
/usr/lib/libsnmp.so: undefined reference to `EVP_md5'
/usr/lib/libsnmp.so: undefined reference to `HMAC'
/usr/lib/libsnmp.so: undefined reference to `EVP_sha1'
/usr/lib/libsnmp.so: undefined reference to `des_cbc_encrypt'
/usr/lib/libsnmp.so: undefined reference to `des_key_sched'
/usr/lib/libsnmp.so: undefined reference to `EVP_DigestUpdate'
/usr/lib/libsnmp.so: undefined reference to `RAND_bytes'
/usr/lib/libsnmp.so: undefined reference to `des_ncbc_encrypt'
collect2: ld returned 1 exit status
make: *** [snmpapp] Error 1
请高手帮忙!!!
/usr/lib/libsnmp.so: undefined reference to `EVP_DigestInit'
/usr/lib/libsnmp.so: undefined reference to `EVP_DigestFinal'
/usr/lib/libsnmp.so: undefined reference to `EVP_md5'
/usr/lib/libsnmp.so: undefined reference to `HMAC'
/usr/lib/libsnmp.so: undefined reference to `EVP_sha1'
/usr/lib/libsnmp.so: undefined reference to `des_cbc_encrypt'
/usr/lib/libsnmp.so: undefined reference to `des_key_sched'
/usr/lib/libsnmp.so: undefined reference to `EVP_DigestUpdate'
/usr/lib/libsnmp.so: undefined reference to `RAND_bytes'
/usr/lib/libsnmp.so: undefined reference to `des_ncbc_encrypt'
collect2: ld returned 1 exit status
make: *** [snmpapp] Error 1
请高手帮忙!!!
|
加上libcrypto.so试一下
-lcrypto
-lcrypto